As a web designer, one very technical concept that I have had to try to communicate with my clients is DNS. What is DNS? What are DNS records, what is DNS propagation? These are some of the questions I am going to try to answer in as non-technical a way as possible.
DNS stands for Domain Name System, and it exists to make it easier for human beings to find things on the Internet. What do I mean by that? When you or I visit a website, we use a domain. Let’s say I created a website for a client’s dog walking business. He registers a domain, and we create a website at www.petespawsdogwalking.com. If someone types that into a web browser, they will go to his website. Those domains are handy for humans, but not so much for computers. In reality, the computer does not use an address like petespawsdogwalking.com but uses an Internet Protocol (IP) address. IP addresses, or at least the current version of them, consist of 4 numbers between 0 and 255, separated by dots. (e.g. 192.168.51.2)
When I type petespawsdogwalking.com, the web browser goes to a DNS server, located on the internet and looks up that domain. The DNS tells the browser the address of the server where that website is located, allowing the browser to translate the domain address to an IP address.
A great way to think about this is if you are using a GPS to find a location. As humans, we use street addresses like 123 Main St, but a GPS is going to use coordinates. Somewhere along the line, a translation needs to be made between the physical address and a set of coordinates. If you’re using Google Maps, for example, the application will look up the address in a database that is kept on one of Google’s servers, so it knows that 123 Main street is actually a particular set of GPS coordinates.
If we don’t understand what domain registration and hosting are, we may run into problems understanding how the system works. If I want to register a domain, I go to a domain registrar, which is a company, like GoDaddy, NameCheap, eNom, and others which, for a fee, will help you secure that domain for your use. If I go back to the example of our dog walker, I go to a registrar and I search to see if petespawsdogwalking.com has already been registered. It has not, so I can now claim it. I pay an annual fee, and as long as I keep the registration current, no one else can use that domain.
Now let’s say Pete wants to build a website for his business. That website will consist of files, which need to be stored on and served from a computer, called a web server, which is connected to the internet. Pete rents that space from the hosting company for a monthly fee. Now Pete may have opted to buy his hosting from the domain registrar or he could have gone elsewhere. In either case, Pete will use DNS records to tell people who enter his domain into the browser the address of the server where his website lives.
DNS records help us direct traffic that is looking for our domain. There are several types of records, and we’ll look at the most common ones you’ll come across.
Think of a name server as a power of attorney. The name server states who has the final say on DNS records. This is necessary because I can manage my DNS in a few different places. I can manage it from the domain registrar, from the host server, and even some third-party services like Content delivery networks. The name servers are set at the registrar and give the authority to set other records either to itself or somewhere else.
Let’s say that there is some confusion in a new subdivision. On some plans, a certain street is called Oak street, and numbers go from east to west, and on other plans, it is called Elm street, and the numbers go from west to east. Now in order to resolve this issue, someone goes to the city to ask which is correct. The city could tell you which is correct, or the city could redirect you to a different department, or the developer, or to the county clerk in order to get the correct answer. The city is giving that authority to itself, or a 3rd party, the way that a name server delegates the authority to set other DNS records
In a very simple setup, setting the name server might be enough. In other instances, more control might be needed. This is where other record types come into play. To understand this we can think of Pete’s dog walking business. The business may a corporate address, which perhaps is Pete’s home. Pete rents a PO box for his mail, and Pete has another location that he uses for people to drop off or pick up their dogs. The address that someone needs for Pete’s business depend on exactly what you’re looking for. DNS records help us make sure that traffic finds the right server.
An A-Record is for a website. It tells a web browser that you can find the website petespawsdogwalking.com at a particular server address. Let’s say Pete starts using a 3rd party service for doing his bookings. He creates a subdomain bookings.petespawsdogwalking.com. It’s a separate microsite that is stored on a different server entirely. An A-Records would direct traffic going to the booking site to the appropriate server while keeping the traffic for the main site going to the original server. If you look at a company like Google, they have hundreds of websites spread out all over the world. A-Records allow them to have multiple sites with one domain, spread out over the entire internet, rather than all needing to be on one server.
MX Records are for mail. Sometimes the mail is kept on the same server as the website, and sometimes it is a third party. In real-world terms, you can think about our dog walking business. Does the mail go to the main address? Maybe Pete spends all his time out walking dogs, and it is more convenient for him to check his mail at a PO Box. In the same way, Pete could opt to have his email handled by a different server than his website. Many businesses use email providers like Google (G Suite) and Microsoft (Exchange or Office365). The MX records allow you to specify where those emails go.
CNAME records(short for canonical name records) are used to point one domain to another. The most common example of this is www. The www prefix is a left over from the early days of the internet. There will be a CNAME record in place pointing www.petespawsdogwalking.com to petespawsdogwalking.com. Either variation will work.
Perhaps Pete expands his business into pet grooming. He rebrands his business as petespetpretty.com. A CNAME record could be used so that any traffic trying to get to petespawsdogwalking.com would go to the new domain.
CNAMEs can also be used to point to third-party services, like our booking site. The big difference is that A-Records point to a server via an IP address, whereas CNAME records point to a domain. So rather than having an A-Record pointing from booking.petespawsdogwalking.com to 123.434.23.3, we could have a CNAME pointed from booking.petespawsdogwalking.com to booking12345.bookmystuff.com
TXT or Text records allow you to add a string of text to a domain. These are often just used to show that you own a domain. If you’re connecting your email to Google, for example, they will ask you to verify that you own a domain by creating a particular TXT record. If that record appears in the domains DNS, then they know that you do, in fact, control that domain.
The final topic we need to touch on is how DNS records make their way around the Internet. There is not one central location for DNS information. The internet was decentralized by design. There are thousands of servers all over the world that can serve up DNS records. If a change is made to DNS records, the change has to spread to all the other DNS servers. This process, called DNS propagation, takes time.
DNS propagation is sort of like a piece of breaking news. Let’s say that Pete tells reporters at the NY Times that his dog walking empire is expanding to the Asian Pacific market. This is reported in the Times, but after the story breaks, other news outlets start to verify the story themselves. After a few days, that story has circulated, and it is pretty much common knowledge.
When it comes to DNS, Perhaps Pete builds a new website and puts it on a new server that can handle more traffic because of the incredible popularity of his website. He changes the DNS records to point to the new server. For a while, Pete sees his old website. Then Pete sees the new website, but on his phone, he sees the old site. DNS propagation can take 5 minutes, or in some cases, it can take 48hrs. during that time, different devices, connected to different DNS servers may see one website or the other. Any time we make a change to a record we can expect there to be a delay. 48 hours is pretty extreme, but certainly, 1-8 hours is pretty common. There really isn’t much you can do about it. It’s the web design equivalent of watching paint dry.
Congratulations, you made it through an explanation of what can be a pretty technical topic. I hope that I’ve made it somewhat clearer for you. If you have any questions, please feel free to leave a comment below.
Mission Bell Communications Inc.
A-44 Frederick St.
Stratford, ON N5A 3V4
+1 (226) 921-5070
©2020 Mission Bell Communications Inc. All Rights Reserved
Dive straight into the feedback!Login below and you can start commenting using your own user instantly