{"id":3171,"date":"2016-11-11T18:06:15","date_gmt":"2016-11-11T23:06:15","guid":{"rendered":"https:\/\/www.globo.tech\/learning-center\/?p=3171"},"modified":"2017-12-12T16:08:30","modified_gmt":"2017-12-12T21:08:30","slug":"configure-name-servers-cpanel-whm-ssh","status":"publish","type":"post","link":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/","title":{"rendered":"How to configure name servers in cPanel-WHM via SSH"},"content":{"rendered":"<h1>How to configure name servers in cPanel-WHM via SSH<\/h1>\n<p>The Domain Name System, or DNS, is one of the most essential parts of the modern web. Whenever you enter a domain name into your browser&#8217;s URL bar, DNS facilitates the translation of this request by name servers into a server-routable IP address. This process is what makes browsing the web so easy to do.<\/p>\n<p>A name server is a program that runs on a server and provides DNS information for that server in response to any requests. Without a properly configured name server, people will have trouble finding the websites you host. This guide will walk you through the steps for setting up name servers in cPanel\/WHM and ensuring their correct functioning.<\/p>\n<h2>Getting started<\/h2>\n<p>Here&#8217;s what you need to know before you start:<br \/>\n\u2022\tYou&#8217;ll need to have root access to the parent server (<a href=\"https:\/\/www.globo.tech\/cloud-server-pricing\" target=\"_blank\">Cloud Server<\/a> or <a href=\"http:\/\/www.globo.tech\/dedicated-server-hosting\" target=\"_blank\">Dedicated Server<\/a>) in order to set up a name server.<br \/>\n\u2022\tYou will also need to have your name servers registered to your IP addresses at the registrar level. We&#8217;ll assume you will have two of them for the purposes of this guide. Take care of this before proceeding with the rest of the steps.<\/p>\n<h2>Tutorial<\/h2>\n<p>The first step will be to create the name servers. In order to do that, you must go to the &#8220;Basic cPanel and WHM setup&#8221; section of your cPanel instance. At the bottom of the page will be a couple of textboxes labeled as name servers. In these boxes you&#8217;ll write the name servers that you registered with at the registrar.<\/p>\n<p>Now we should verify the name server registration. That will require clicking on the &#8220;Nameserver IP&#8221; option in the WHM menu on the left-hand side of the page. Note here whether both of the name servers are showing up without an IP address.<\/p>\n<p>If they are, then it&#8217;s now time to log in using SSH and delete the cPanel name servers IP cache. Connect to your server and make sure that you have root access. Enter the command below in order to delete the name server ip cache file:<\/p>\n<p><code>rm \/var\/cpanel\/nameserverips.cache<\/code><\/p>\n<p><strong>Edit cPanel Nameservers script file<\/strong><\/p>\n<p>Your next step is to edit the name servers script file. We&#8217;ll do this with nano, or you can use your preferred text editor:<\/p>\n<p><code>nano \/var\/cpanel\/nameserverips.yaml<\/code><\/p>\n<p>For each name server in the file, manually replace the IP addresses with the ones you registered at the registar level for your name servers. See below for an example (using gtcomm.net and random IPs for the purpose of this guide):<\/p>\n<p><code class=\"gris\">ns1.gtcomm.net:<br \/>\n67.215.215.12: 1<br \/>\ncount: '2'<br \/>\nzones: gtcomm.net,globotech.net<br \/>\nns2.gtcomm.net:<br \/>\n67.215.215.13: 1<br \/>\ncount: '2'<br \/>\nzones: gtcomm.net,globotech.net<\/code><\/p>\n<p><code class=\"rouge\">Note: Replace 67.215.215.12 with the IP address of your first nameserver and 67.215.215.13 with the IP address of your second nameserver.<\/code><\/p>\n<p>Save and close the file. The next file we&#8217;ll edit is \/etc\/nameserverips:<\/p>\n<p><code>nano \/etc\/nameserverips<\/code><\/p>\n<p>The below is an example of how we&#8217;d like you to alter the file. Make sure to replace the gtcomm.net domain and the IP addresses with your own domain and IP addresses.<\/p>\n<p><code class=\"gris\">67.215.215.12=ns1.gtcomm.net<br \/>\n67.215.215.13=ns2.gtcomm.net<\/code><\/p>\n<p>Finally, it&#8217;s time to restart cPanel and named, which is our name server daemon. Use this command to do so:<\/p>\n<p><code>\/etc\/init.d\/named restart && \/etc\/init.d\/cpanel restart<\/code><\/p>\n<p>After having finished, if there are any zones configured to the server, you&#8217;ll have to verify that the dns entries for each name server in each zone matches the IP. Go back into your graphical cPanel\/WHM interface and click on &#8220;Edit DNS Zones&#8221; in the left-hand menu. Select each zone and click the &#8220;modify&#8221; option, which will show you the values. If any of them are incorrect, you can update them and save your changes.<\/p>\n<h2>Conclusion<\/h2>\n<p>Now you know the proper procedure for configuring your name servers on a server using cPanel\/WHM. <\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>How to configure name servers in cPanel-WHM via SSH The Domain Name System, or DNS, is one of the most essential parts of the modern web. Whenever you enter a domain name into your browser&#8217;s URL bar, DNS facilitates the translation of this request by name servers into a server-routable IP address. This process is<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[],"class_list":["post-3171","post","type-post","status-publish","format-standard","hentry","category-web-hosting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to configure name servers in cPanel-WHM via SSH - Globo.Tech<\/title>\n<meta name=\"description\" content=\"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now &amp; Provides DNS information in response to any requests!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to configure name servers in cPanel-WHM via SSH - Globo.Tech\" \/>\n<meta property=\"og:description\" content=\"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now &amp; Provides DNS information in response to any requests!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/\" \/>\n<meta property=\"og:site_name\" content=\"Globo.Tech\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-11T23:06:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-12T21:08:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"963\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"GloboTech Communications\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"GloboTech Communications\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/\",\"name\":\"How to configure name servers in cPanel-WHM via SSH - Globo.Tech\",\"isPartOf\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\"},\"datePublished\":\"2016-11-11T23:06:15+00:00\",\"dateModified\":\"2017-12-12T21:08:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\"},\"description\":\"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now & Provides DNS information in response to any requests!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.globo.tech\/learning-center\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to configure name servers in cPanel-WHM via SSH\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#website\",\"url\":\"https:\/\/www.globo.tech\/learning-center\/\",\"name\":\"Globo.Tech\",\"description\":\"Welcome to the Official Globo.Tech Learning Center\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87\",\"name\":\"GloboTech Communications\",\"sameAs\":[\"http:\/\/www.gtcomm.net\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to configure name servers in cPanel-WHM via SSH - Globo.Tech","description":"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now & Provides DNS information in response to any requests!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/","og_locale":"en_US","og_type":"article","og_title":"How to configure name servers in cPanel-WHM via SSH - Globo.Tech","og_description":"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now & Provides DNS information in response to any requests!","og_url":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/","og_site_name":"Globo.Tech","article_published_time":"2016-11-11T23:06:15+00:00","article_modified_time":"2017-12-12T21:08:30+00:00","og_image":[{"width":1920,"height":963,"url":"https:\/\/www.globo.tech\/learning-center\/wp-content\/uploads\/2016\/09\/GloboTech-Logo.png","type":"image\/png"}],"author":"GloboTech Communications","twitter_misc":{"Written by":"GloboTech Communications","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/","url":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/","name":"How to configure name servers in cPanel-WHM via SSH - Globo.Tech","isPartOf":{"@id":"https:\/\/www.globo.tech\/learning-center\/#website"},"datePublished":"2016-11-11T23:06:15+00:00","dateModified":"2017-12-12T21:08:30+00:00","author":{"@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87"},"description":"This tutorial will show you how to configure name servers in cPanel-WHM via SSH. Read now & Provides DNS information in response to any requests!","breadcrumb":{"@id":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.globo.tech\/learning-center\/configure-name-servers-cpanel-whm-ssh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.globo.tech\/learning-center\/"},{"@type":"ListItem","position":2,"name":"How to configure name servers in cPanel-WHM via SSH"}]},{"@type":"WebSite","@id":"https:\/\/www.globo.tech\/learning-center\/#website","url":"https:\/\/www.globo.tech\/learning-center\/","name":"Globo.Tech","description":"Welcome to the Official Globo.Tech Learning Center","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.globo.tech\/learning-center\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.globo.tech\/learning-center\/#\/schema\/person\/e17784b37f4a4f49b7bc611847912e87","name":"GloboTech Communications","sameAs":["http:\/\/www.gtcomm.net"]}]}},"_links":{"self":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/comments?post=3171"}],"version-history":[{"count":2,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3171\/revisions"}],"predecessor-version":[{"id":4021,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/posts\/3171\/revisions\/4021"}],"wp:attachment":[{"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/media?parent=3171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/categories?post=3171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globo.tech\/learning-center\/wp-json\/wp\/v2\/tags?post=3171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}