{"id":56425,"date":"2020-07-28T14:54:32","date_gmt":"2020-07-28T19:54:32","guid":{"rendered":"https:\/\/blog.cpanel.com\/?p=56425"},"modified":"2020-07-28T14:54:32","modified_gmt":"2020-07-28T19:54:32","slug":"how-to-configure-dns-nameservers-with-cpanel","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/tips-and-tricks\/how-to-configure-dns-nameservers-with-cpanel\/","title":{"rendered":"How to Configure DNS Nameservers with cPanel"},"content":{"rendered":"\n
The domain name system (DNS) is fiendishly complicated, and managing the nameservers that power it can be perplexing. Server administrators know how frustrating it is to change DNS configurations and patiently wait for them to propagate, only to find out something went wrong and the site is still unreachable.<\/p>\n\n\n\n
You\u2019ll be happy to hear that cPanel & WHM makes it super easy to manage domains and even a private nameserver. In this article, we\u2019re going to explore some essential DNS concepts and then show you how to configure a custom server with cPanel.<\/p>\n\n\n\n
Before we wade into the deep end, let\u2019s make sure we\u2019re on the same page with a couple of terms:<\/p>\n\n\n\n
A website has a name, which is for humans, and an IP address, which is for the machines that route data around the internet.<\/p>\n\n\n\n
Nameservers are the internet\u2019s contacts app. When you want to call someone, you search for a name, and the app gives you their number. To put it another way, a contacts app maps<\/em> names to phone numbers.<\/p>\n\n\n\n A DNS server does the same for the internet, except it maps domain names to IP addresses. The internet\u2019s routers and switches don\u2019t understand domain names; they work with IPs. When you type a web address or click on a link, your browser knows the site\u2019s name, but it has to execute a nameserver lookup to find out the matching IP address.<\/p>\n\n\n\n Each nameserver is a tiny part of a vast network. The domain name system is a hierarchical arrangement of servers that fall into two broad categories: recursive and authoritative. The one that knows the mapping between a site\u2019s domain name and IP address is its authoritative DNS server<\/em>; it\u2019s the definitive source of truth about that domain. <\/p>\n\n\n\n There are hundreds of thousands of authoritative nameservers on the internet. How does a browser know which one to ask? That\u2019s the role of recursive nameservers<\/em>. A browser asks a recursive server, often hosted by an ISP, to find the right IP address, and it asks the rest of the domain name system.<\/p>\n\n\n\n Recursive servers are an essential component of the domain name system, but we\u2019re primarily interested in the authoritative variety because web hosts often manage the authoritative nameserver for their client\u2019s domains.<\/p>\n\n\n\n DNS records indicate how domains correspond to IPs or other domains. They are stored in text documents called zone files, and they are the source of the information nameservers use to respond to lookup requests. A single record looks like this:<\/p>\n\n\n\n example.com. IN A 198.51.100.85 There are numerous types of records. In the example, we used an \u201cA record,\u201d which maps a domain to an IP address. Other types include:<\/p>\n\n\n\n Zone files can contain dozens of record types and other directives, but you will usually only need to edit these four, which can be done in the cPanel interface.<\/p>\n\n\n\n cPanel creates and manages records in response to changes you make in the interface, but you can also edit zone files in the Zone Editor, which you will find in the Domains section of the cPanel Home page.<\/p>\n\n\n\n In the Zone Editor, it is easy to add, remove, and edit records for domains hosted on the server. Find the zone you would like to change, and click on Manage<\/em>.<\/p>\n\n\n\n cPanel integrates the PowerDNS nameserver, a high-performance server with low memory requirements. PowerDNS is the default, but you can also select BIND if you need recursive DNS or to edit zone files manually.<\/p>\n\n\n\n There are also options to select MyDNS and NSD, but both are deprecated and will be removed from cPanel in the future.<\/p>\n\n\n\n Only server administrators can change the DNS server. You will find the setting under Nameserver Selection<\/em> in the Server Configuration section of the WHM sidebar menu. You can also disable the nameserver on this page. We recommend that you stick with PowerDNS unless you need features only available in BIND.<\/p>\n\n\n\n Your server\u2019s domains must have an authoritative DNS server. You could use one provided by a third party, but you can also configure one locally on your cPanel server. A private nameserver lets hosting providers give their customers a branded address such as ns1.mycompany.com<\/em>.<\/p>\n\n\n\n Another benefit is that you control the domain. If you move to another server hosting platform, your domain comes too, and your clients don\u2019t have to change their configuration.<\/p>\n\n\n\n cPanel & WHM makes it straightforward to configure a private domain server. The first step is to ensure the nameserver is active in the Nameserver Selection<\/em> interface mentioned above.<\/p>\n\n\n\n Next, navigate to Basic WebHost Manager\u00ae Setup<\/em> in WHM\u2019s Server Configuration menu.<\/p>\n\n\n\n At the bottom of the page, enter two domain names of your choice. Typically, these are named ns1.mydomain.com<\/em> and ns2.mydomain.com<\/em>, where mydomain.com<\/em> is a domain associated with your server.<\/p>\n\n\n\n Click \u201cConfigure Address Records\u201d next to each entry and verify that the IP address is the same as your cPanel server. This will add the necessary records to the zone file.<\/p>\n\n\n\n Finally, tell your registrar about the DNS server\u2019s domain names. The process differs depending on the registrar, so you should consult their DNS server documentation or \u200c<\/em>How to Set Up Nameservers in a cPanel & WHM Environment<\/em><\/a>, which includes instructions for various registrars and details on how to configure cPanel to use DNS servers hosted on different IPs.<\/p>\n\n\n\n After this last step, it may take some time until you can use your new server. The domain name system is massive, and records take a while to propagate around the world, but, all being well, you now have a private nameserver that clients can use for their domains.<\/p>\n\n\n\n The domain name system can be hard to get your head around, but, in most common web hosting and server administration scenarios, you only need to know a handful of concepts. cPanel & WHM takes care of the heavy lifting so that it\u2019s straightforward to manage records and configure a private nameserver that reflects your business and its brand.<\/p>\n\n\n\n As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You\u2019ll find us on Discord<\/a>, the cPanel forums<\/a>, and Reddit<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" The domain name system (DNS) is fiendishly complicated, and managing the nameservers that power it can be perplexing. Server administrators know how frustrating it is to change DNS configurations and patiently wait for them to propagate, only to find out something went wrong and the site is still unreachable. You\u2019ll be happy to hear that […]<\/p>\n","protected":false},"author":77,"featured_media":65449,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[61],"tags":[],"class_list":["post-56425","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips-and-tricks"],"acf":[],"yoast_head":"\nWhat Are DNS Records?<\/strong><\/h2>\n\n\n\n
<\/p>\n\n\n\nHow Do I Find My DNS Records in cPanel?<\/strong><\/h3>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
How Do I Change Nameservers in cPanel?<\/strong><\/h2>\n\n\n\n
How to Configure Custom Nameservers in cPanel<\/strong><\/h2>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n
<\/figure>\n\n\n\n