Linking a domain to a website – Part 2 Finding the DNS
In part 1 of this guide I described what a DNS was and how to set it up for GoDaddy hosting. In this part, I’ll show you how to check that you have the right DNS names and how to set them with your domain registrar.
Finding and checking the names of the name servers
Getting the name of the name server right is important. If you choose the wrong name servers no-one will be able to see your site. Changing name servers takes some time to process, during which time your site may be inaccessible. If you are transferring a live site you probably want to minimise down time and can’t afford to make a mistake or find the right name servers by trial and error.
You may find that your hosting provider does not clearly indicate the name servers that you should use. GoDaddy for example provides a cryptic date based list (more on that later).
If you have a list of several possible name servers, the easiest way I found to make sure that I chose the right one was just to ask each where it thought my site was. The default name servers will be the ones which get it right. You can do this testing using the linux “dig” command called. There is a web interface for dig which makes it very easy. Here is what you need to do:
- Get the list of possible name servers used by your host. (I’ve listed the GoDaddy ones at the end of this post).
- Go to http://www.digwebinterface.com/
- Enter the domain name that you have just set up in the “Hostnames or IP addresses:” box.
- In the Type: drop down list choose “NS” (for name server)
- In the Nameservers: section choose and in the box below paste the list of your hosting provider’s potential name servers.
- Click the “dig” button (not the “reset form” button which is annoyingly just below the box you jut pasted into!)
You should then see a growing list of the name servers that are being queried. For each name server you get a line something like this:
If there is no information about domain on this server you’ll see a couple of blank line and then the next name server information. If your authoritative name servers are in the list of possible name servers they will have information after them, looking like:
yournewdomain.com. 3600 IN NS ns20.somenameserver.com. yournewdomain.com. 3600 IN NS ns21.somenameserver.com.
And these are your name servers (eg ns20.somenameserver.com and ns21.somenameserver.com).
GoDaddy details
GoDaddy’s documentation for finding the name of your name server was not as clear as it could be. After a bit of searching on the support section I found the “Getting Started with Linux Shared Hosting” pdf (version 2.4 (12.03.07) ).
The document has a section on name servers and states:
The default nameservers for your hosting account depend on the date you set up your
hosting. Use this list to determine your default nameservers:
There then follows a list of date ranges and corresponding name servers. The above statement suggested to me that the relevant date was the one that I “set up your hosting” – i.e. the date I first got the hosting account and put my first website on it. However, I think that they actually mean the date that you set up the name server for the domain.
DNS list for GoDaddy as of October 2009:
ns25.domaincontrol.com ns26.domaincontrol.com ns51.domaincontrol.com ns52.domaincontrol.com ns43.domaincontrol.com ns44.domaincontrol.com ns5.secureserver.net ns6.secureserver.net ns3.secureserver.net ns4.secureserver.net ns1.secureserver.net ns2.secureserver.net wsc1.jomax.net wsc2.jomax.net
Setting the name servers with your domain registrar
Now we have set up the name servers and know their names we can change them at your domain registrar’s end. In my case I was changing the name server for a domain registered with UK Reg. You basically go to the web site of the domain registrar that you registered with, then go to the control panel and find the DNS management.
Before you change the name servers make a note of the old ones (in case something goes a bit wrong). You should also be aware that the name servers will be handling everything related to the domain you are planning to change. If you have email being handled by you domain registrar you’ll need to set up emails with your hosting DNS.
Enter the name servers that you found out when you set up the hosting side and save your changes.
As we mentioned before, name servers use caching. This caching means that when you change your authoritative name sever addresses in your domain registrar control panel it will take a while for name servers all over the world to update their caches.
You can track the progress of your change around the world by entering your domain into http://www.whatsmydns.net/. It will query a random sample of name servers around the world so you can see the change getting picked up around the world.
A short note on email
If you had email set up with your registrar you may need to change something called the MX records for your new DNS servers (you’d make these changes through your hosting control panel under DNS settings). Alternatively your hosting package may include some email facilities which you could use instead.
Good luck!
Related posts: