How DNS works
The most asked questions I hear, are people moving their hosting to us, and not knowing how to tell the world they are moving. The answer is of course, DNS. Domain Name Service, which is the process of computers translating their names for each other (horrible numbers, like 192.168.234.123) to names we can understand, like www.icantbelieveitsnotbutter.com. Whilst most people do not need a complete understanding of how DNS works, it is important that you at least have a idea of what is going to happen when you advise us to move the domain -- telling us the wrong things can cause outages for your website and email.
DNS in a nutshell
As I said above, DNS is a translation service from computer readable names, to human readable names. The theory is similar to a phone book, or directory assistance, which translate phone numbers to names. The DNS system is distributed across the whole Internet, virtually every Internet provider has two or more DNS servers, most hosting companies do as well, and a lot of large businesses, ie Microsoft, Dell, HP all have their own servers. (of course, having 30,000+ employees, they probably have their own directory assistance too).
Every single person on the Internet uses DNS, 99% of them without even knowing. Every time you go to a website, you do a search of the DNS system to find the location of the site. Every time you send an email, your ISP's mail server does a DNS search to find the mail server for that domain. As I said, DNS works on a distributed basis, no one server holds the records for every single domain. There are a lucky 13 master servers, that contain a list of which DNS servers handle which domains, when you look for a domain that your ISP's DNS server does not know, it asks the master servers, which DNS server does know about this domain, then it asks that DNS server for the information it needs, before passing it back to you.
Changing DNS Servers
When you change hosting providers, the normal procedure is to also change your domain's delegation to the new hosting providers DNS servers. This procedure, known as redelegation, is best, as it means one company handles everything for you, and if they make a change to the location of your website, for instance moving it onto a faster server, they can also update the DNS records straight away, so no one notices. To find out who your domain is delegated to, you need to do a whois search. A whois search will not show you where your website is, but it will show you which DNS servers know where it is. Customers of Anchor should always see ns1.anchor.net.au and ns2.anchor.net.au in their whois information. If your domain is currently with another company, and you need to bring it to Anchor, you need to change that information. Generally, this is done through a web page of the company that you registered the domain with, it is a simple change.
Once the change is made, depending on the type of domain, it can take up to 3 days for the rest of the Internet to notice you have moved. (The same as when you move house, it can take quite a while for other people to realize). The reason for this is explained in the next paragraph. Suffice to say, for a period of 3 days, some people will see the new site, some people will still see the old one. Some email will go to the new server, some will go to the old server. This is avoidable through careful planning, and a week long changeover.
Buzzwords & Geek words, translated!
Often when talking about DNS, the words (and abbreviations), TTL, Cache and Propagation come up, but what do they mean? In plain English, the DNS server responsible for your domain has a file with all the information about your domain in it, and when another DNS needs information about your domain it is pulled from this file, along with a TTL value. TTL stands for Time To Live, and it is the maximum time a foreign DNS server can store this information locally, without asking if it has changed (the process known as caching). When you redelegate your domain from one DNS server to another, the amount of time it takes depends on the TTL value in the old server. If this value is high, which it generally is (around the 1 day mark) then any DNS server that has requested information on your domain in the past 24hrs will still see the old records; once the TTL period expires the servers will then see the new details.
Additionally for .com, .net, .org domains, no server will see the change until the DNS system reloads at midnight, USA time, whilst the .au domains are updated instantly. This process of waiting for all the Internet to see your move is called propagation. As I said above, there is a way to speed up the process, and that is to redelegate a week early with your new hosting company copying the old records, with a very low TTL, (ten minutes or so), and then when you are ready for the website and email to go to the new server, changing them on the new DNS server. This means the whole Internet will see the change in 10 minutes, regardless of the domain name (note, some ISP's do not confirm to the standard for DNS caching, and may not update instantly).
So what does a domain record look like
@ IN SOA ns1.anchor.net.au. hostmaster.anchor.net.au. ( 2004030401 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum @ IN NS ns1.anchor.net.au. IN NS ns2.anchor.net.au. IN MX 50 smtp1.anchor.net.au. IN MX 100 smtp2.anchor.net.au. IN A 22.214.171.124 smtp IN A 126.96.36.199 www IN CNAME @ ftp IN CNAME @ mail IN CNAME smtp pop IN CNAME smtp pop3 IN CNAME smtp
That looks scary! What does it all mean?
Lets breakdown the file one line at a time
@ IN SOA ns1.anchor.net.au. hostmaster.anchor.net.au. (
This line, the Start of Authority, states that ns1.anchor.net.au is the domain server responsible for your domain, and that firstname.lastname@example.org is the contact for this server
Skip the next 4 lines: Expire, Retry, Maximum and Serial, as these are not important in this situation
86400 ) ; Minimum
The value of minimum is the TTL, ie the length of time, other servers can cache the information for your domain
@ IN NS ns1.anchor.net.au.
The third column on this line, NS, means nameserver, this line means that your server is listed in ns1.anchor.net.au (and below that in ns2.anchor.net.au). NS lines give a list of all the nameservers responsible for your domain.
IN MX 50 smtp1.anchor.net.au.
Again, the column after IN is important, (all your records should say IN), MX stands for Mail eXchange, and MX lines are a list of servers that handle your email, the number after MX is the priority, the lower the number, the higher the priority
IN A 188.8.131.52
On this line, A means Address. All A records are direct translations of names to numbers. If the line starts with a word, that is a host name, ie www.yourdomain.com.au. If it doesn't have a word, it means just yourdomainname.com.au. If it has a * it means every subdomain of yourdomainname.com.au that's available.
mail IN CNAME smtp
The final record type is CNAME, whilst this stands for Canonical Name, it is often easier to think of it phonetically, ie; See-Name. As thats what it means, in this case, the record tells computers looking for mail.yourdomain.com.au to go look for smtp.yourdomain.com.au instead.
Now don't you feel enlightened?
Do I have to have this? It all seems so complicated
If you want people to see your website, and email you, you must have DNS records. It is unavoidable. However as I said at the start of this article, you only need to have an understanding of the top level of the system, ie, when I redelegate, it takes 3 days, my email will be scattered. You do not need to understand how the entire system works, that is the job of your DNS administrator (often called hostmaster), who is typically your web hosting company.
Can I do this myself?
If you have a static IP address and a permanent Internet connection you can host your own DNS, and if that doesn't make any sense to you, you are probably better off letting someone else handle it. You may notice in a whois search that most domains have 2 DNS servers listed, and some have up to 10. This is for redundancy: if one server dies, but the others are still working, then your website and email are unaffected; but if you only have one server, and it goes down for whatever reason, then your email and website are offline too.