Configuring Name Servers (NS) correctly is essential for connecting your domain to your hosting provider and ensuring your website, email, and other services function properly.

What Are Name Servers?

Name Servers (NS) are a part of the Domain Name System (DNS) that translate domain names (e.g., example.com) into IP addresses (e.g., 192.168.1.1), allowing visitors to reach your website.

Example Name Servers:

If using a hosting provider:
ns1.hostingprovider.com
ns2.hostingprovider.com

If using custom name servers (private NS):
ns1.yourdomain.com
ns2.yourdomain.com

Steps to Configure Name Servers for Hosting

Updating Name Servers in Your Domain Registrar

  1. Log in to your domain registrar’s control panel.
  2. Find the DNS or Name Server settings (commonly under “DNS Management” or “Domain Settings”).
  3. Change the existing name servers to those provided by your hosting provider.
    • Example:
      ns1.nshosting.com
      ns2.nshosting.com
  4. Save Changes and wait for DNS propagation (24–48 hours).

Setting Up Custom Name Servers (Private NS)

If you want to use custom name servers (e.g., ns1.yourdomain.com), follow these steps:

  1. Register Glue Records at Your Domain Registrar
    • Go to your domain registrar.
    • Find Custom Name Server (Glue Record) settings.
    • Register:
      ns1.yourdomain.com > 192.168.1.1 (Your hosting IP)
      ns2.yourdomain.com > 192.168.1.2 (Your hosting IP)
    • Save and wait for propagation.
  2. Update Your DNS Zone File in NSHosting Panel
    • Log in to your NSHosting DNS control panel.
    • Navigate to DNS Management.
    • Add NS records pointing to your private name servers:
    yourdomain.com.   IN   NS   ns1.yourdomain.com.
    yourdomain.com.   IN   NS   ns2.yourdomain.com.
    • Save the settings.

Pointing Your Domain to Your Hosting Server

1. If Using a Hosting Provider’s NS

  • Add an A record pointing your domain to the hosting server’s IP.
example.com. IN A 192.168.1.1
  • Add MX records if setting up email:
example.com. IN MX 10 mail.example.com.

2. If Using a CDN (Cloudflare, etc.)

  • Change NS records to point to the CDN name servers instead.

Verifying Your Name Server Configuration

After updating name servers, verify the changes using these tools:

  • DNS Checker: Global DNS propagation check.
  • Whois Lookup: View current NS records.
  • NS Lookup Command (Linux/Mac/Windows):
nslookup -type=NS yourdomain.com

Troubleshooting Common Issues

Issue Solution
DNS Propagation Delays
Name servers take too long to update.
  • Wait 24–48 hours.
  • Clear local DNS cache:
    ipconfig /flushdns (Windows)
    sudo systemctl restart nscd (Linux)
Website Not Loading
DNS is misconfigured.
  • Ensure A and NS records are correct.
  • Use ping yourdomain.com to verify response.
Emails Not Working
Missing MX, SPF, or DKIM records.
  • Add correct email records in DNS management.
  • Verify MX, SPF, DKIM, and DMARC configurations.

Conclusion

Configuring name servers correctly ensures your domain is properly linked to your hosting. Whether using NSHosting’s name servers or setting up custom NS, follow the above steps and verify the settings for a seamless experience.