DNS – The Language of the Internet
One common issue I see with people new to web hosting is their confusion about how the Domain Name System (DNS) works, especially when it comes to updating a Name Server (NS) record for a domain versus changing an individual IP address in a host file. Although it can be tricky, grasping some basics about the technologies and protocols can make this complex topic clearer.
In simple terms, DNS is what lets you type www.google.com.au into a browser and see Google’s homepage. When you make a request, the browser sends it to your local DNS server (usually operated by your ISP), and this server asks other DNS servers to find the record you want. The IP address is then used to connect to the right server, the one that has www.google.com.au.
Essentially, DNS is a hierarchical naming system for networks, like a phone book. It stores and shares records about the location of websites, and converts domain names from human readable words (www.google.com.au) into the format which computers need to communicate, IP addresses (74.125.239.56).
Domains – more than just a name
Domain names are managed by registrars or companies reselling on behalf of a registrar. Once a domain is registered, a domain is recorded in one of the various Internet organisations authoritative databases, depending on the domain extension. For example the records for .au domains are managed by AUDA. This prevents domain name double ups, and ensures that for every domain name there can only be one true record.
When domain names are looked up by DNS it is done in the reverse order we write them. Continuing with the example of www.google.com.au, the first record search is in the “.au” pool of records. From within that pool it narrows the search to the “.com.au” records, and finally it searches for “google.com.au”. This process is called a recursuve lookup, and occurs at the Top Level Domain (TLD) Name Server. The TLD server will then return which Authoritative Name Server (NS) holds the records for the domain name. This is indicated by records displayed similar to the following:
ns1.google.com ns2.google.com
Its all about authority
An NS record attached to a domain name points to an authoritative name server, a server which contains a host file. A host file contains a list of all the various records attached to a domain name, including the domain name itself, any subdomains, mail records and IP addresses; all the information required to make a website function and become accessible via the Internet.
If you think of DNS as the phone book records for many domains, then a zone file can be thought of as the phone book records for one specific domain. It is important to note that the users don’t technically edit the zone file, they usually update records via a web based control panel such as DNS settings within Parallels Plesk Panel.
Why does it matter?
As I mentioned before, those new to the hosting side of the web can sometimes get confused or overwhelmed by how DNS works. And at some point it’s very likely that you’ll need to update details like A records, CNAME records, MX records and NS records, and an update to any one of them has profound consequences, so getting it right matters.
If you want to change the authoritative name servers, to point it to a new host file, then you are making a NS record change. This must be done at the registrar. If you want to change the IP address that a website resolves to, then you need to update the zone file. These changes need to occur at your domain’s authoritative name server, and normally through an easy-to-use control panel.
Wrap Up
Knowing how DNS works, and the various technical names and processes involved not only provides a good overview of how the Internet works, but can also save you time and confusion when making changes to records for a website. Thankfully, we have easy-to-use web control panels which take away much of the confusion and complexity to configure DNS servers. Many systems also automatically add the required settings for you, meaning you don’t need to touch a thing. If you’re ever in doubt or confused, you can always contact your hosting provider who should be able to assist you to edit or update records.