DNS and NS setup guide

August 25, 2024

When you type a website’s name into your browser, you use the Domain Name System (DNS) and mostly, without realizing it. DNS works as the internet’s phonebook. It translates easy-to-remember domain names like example.com into numerical IP addresses.

Computers use these to locate each other online. If there were no DNS, you’d have to remember strings of numbers just to visit a website!

Name Servers (NS) are the focus of this whole system. These servers tell the internet where to find your website. NS records are like signposts that direct incoming traffic to the right server. 

Whenever someone wants to access your domain, their request is sent to your domain’s NS records, which then point them to the correct DNS server. Without these records, your website might be impossible to reach.

Simply put, DNS helps people find websites by translating domain names into IP addresses, while NS records ensure that traffic is correctly routed to the right server. Together, they make sure the internet runs smoothly.

What is an NS Record?

An NS (Name Server) Record is an important component of the Domain Name System (DNS). It helps to specify which servers are responsible for answering queries about your domain name. 

You can think of NS records as the guides that tell the internet where to go when someone types your domain into their browser. Without these records, the DNS wouldn’t ever know which server holds your website’s information.

Whenever someone wants to access your domain, their request is sent to your domain’s NS records. NS, then indicates them to the correct DNS server. 

Example of How an NS Record Works:

If you just type example.com, your request is directed to the NS record. These records turn the query to the DNS servers that are responsible for handling requests for that domain. The DNS server then provides the IP address where the website is hosted, it allows the browser to load the website.

Domain

Type

Name Server

anyname.com

NS

ns1.anynamedns.com

anyname.com

NS

ns2.anynamedns.com

In this case, the NS records are telling the internet to look at ns1.exampledns.com and ns2.anynamedns.com for information about anyname.com.

How To Set Up Your DNS Name Servers

Configuring your DNS name servers is an effortless but important process. Here’s a step-by-step guide to help you get it right:

  1. Login to Your Domain Registrar: Access the platform where you registered your domain (e.g., GoDaddy, Namecheap).

  2. Find DNS Settings: Go to the section where you can manage DNS settings for your domain.

  3. Enter Your Name Servers: Add the name servers provided by your hosting provider or DNS service. These are typically two or more entries, like ns1.yourhost.com and ns2.yourhost.com.

  4. Save Changes: After you’re done entering your name servers, save the configuration. Note that DNS changes can take up to 48 hours to propagate globally.

  5. Verify the Setup: Use a tool like DmarcDkim.com to check if your name servers are properly configured.

What Should You Never Forget?

  • Always use at least two name servers for redundancy.

  • Make sure that your name servers are located in different geographic regions to improve reliability.

  • Regularly check your NS records to make sure they’re up to date and functioning properly.

How are DNS and NS Different?

DNS (Domain Name System) and NS (Name Server) servers are closely related, but they work for different purposes.

  • DNS Servers: These servers translate domain names into IP addresses. When you type anyname.com into your browser, the DNS server finds the IP address. It allows your browser to connect to your site.

  • NS Servers: These servers are made to handle the task of routing requests to the correct DNS servers. They are the starting point for the DNS lookup process, directing traffic to where it needs to go.

When Should NS Records Be Updated?

Updating your NS records is necessary in multiple situations, including:

  • Domain Transfer: When you transfer a domain to a new registrar, you’ll need to update the NS records to reflect the new hosting provider’s name servers.

  • Server Changes: If you switch hosting providers or migrate your website to a new server. It updates your NS records to ensure that traffic is directed to the correct server.

  • DNS Provider Changes: If you switch from one DNS management service to another, you need to update the NS accordingly.

Do Subdomains Need an NS Record?

Subdomains normally do not need separate NS records. By default, subdomains have the DNS settings of the main domain.

For instance, if example.com uses a certain set of name servers, subdomains like blog.example.com or shop.example.com will follow the same DNS rules.

However, there may be exceptions where custom configurations are highly important. For most users, subdomains use the main domain’s NS records. These simplify management and avoid unwanted complications.

Can a Subdomain Have Its Own Name Server?

Yes, a subdomain can have its own name server. This setup works well when you want to host a subdomain separately from the main domain. For instance, if you run a large e-commerce platform, you might want shop.example.com to operate independently from example.com.

Benefits of having separate name servers for subdomains:

  • Custom Control: You can manage the DNS settings of the subdomain independently.

  • Improved Performance: For large sites, splitting traffic between different name servers can improve load times and reliability.

Conclusion

DNS and NS records are important to manage web traffic and ensure your website remains accessible. Name servers direct traffic to the correct locations, while DNS translates domain names into IP addresses. When you properly manage and update your NS records, it ensures website operations, prevents downtime, and enhances user experience.

FAQs

What happens if my NS records are incorrect?

If your NS records are incorrect, your domain won’t be able to direct visitors to your website. It breaks the connection between your domain name and the server where your site is hosted. 

This can lead to downtime, where your site becomes inaccessible, and may even affect your email services.

How often should I check my NS setup?

It’s a good idea to review your NS setup at least a couple of times a year, especially if you’ve made recent changes to your hosting or DNS provider. Additionally, check them anytime you migrate your website, change your hosting provider, or experience issues with website availability.

Does DNS propagation affect my email services?

Yes, DNS propagation can temporarily affect email services. When you update NS records, email routing might be disrupted until the new settings have fully propagated across global DNS servers.

How can I check if my NS records are correctly set up?

You can use online DNS lookup tools like DmarcDkim.com to check if your NS records are set up correctly. Always test after making changes to ensure everything functions well as expected, and make sure to clear your browser cache to verify the updates.

August 25, 2024

Setup Hostinger DMARC, DKIM and SPF DNS Records for Email Domain Authentication

With the increasing use of email technology, spoofing and spamming have also become a major concern. To protect the users from scams, email inbox providers introduced some security standards that must be complied with by the email senders.

Read more →