We need DNS (domain name system) records for the same reason we need house numbers and street names in real life: to help us get to the right location. Every website out there is built on physical hardware, which introduces the problem of where.
When I type in https://brandcraft.com, how does my browser know whichserver to send me to out of the hundreds of millions that exist?
Answering this requires we first understand a few key problems. In this blog, we’ll explore these issues and provide valuable insight on the importance of a DNS for your website. Let’s begin.
What You Should Know About DNS: Problems to Consider
The following problems are all reasons why a DNS is important:
Problem #1: Referencing a Specific Online Device
Every device connected to the Internet has an address. This address (IP address) consists of multiple numbers (e.g., http://184.108.40.206). Getting to the device you want is often as simple as entering those numbers into your browser.
Problem #2: The Human Problem
Since we’re not computers, numbers don’t really do it for us. We need something more human-friendly. Enter domain names (e.g., google.com) and with them a domain name system (aka DNS). In simple terms, a DNS translates domain names into numbers.
Problem #3: Order and Trust
This is the most complicated piece of how things work. Put simply, there’s a hierarchy. At the top, you have the main authority, ICANN. Answering to ICANN, you have around 2,500 registrars managing the world’s domain names.
Below all this, you have nameservers, computers with the sole purpose of translating numbers/IP addresses into domain names. This is all done using–you guessed it–DNS records.
How do DNS records work?
DNS records generally have four components:
Type: This refers to what it’s used for. A and CNAME records are used primarily for websites. MX is used for email.
Domain Name: This is the website address you order from your website host.
IP Address: This is the IP address you want to associate with the domain.
TTL (Time to Live): This is how long the DNS record stays good for (more on this next).
Enough theory. Let’s turn this into a real-world application. What happens when I type a URL into my browser and hit return?
The browser checks if it has a DNS record stored. If there’s a match, it pulls up the site.
If your browser doesn’t have a stored DNS record for the site, it will continue checking for the DNS record, usually the following devices in order:
Internet service provider
If none of these devices have the record stored, your browser eventually will go right to the registrar for your domain and pull the record and, from that, the site.
The reason all these devices store or cache IP records is for speed and because it spreads the load of the mammoth task of directing traffic across the Internet. There is a downside, though…
What Is DNS Propagation and TTL?
When you update a DNS record, you’re only making that change on the nameserver for your domain. All those cached versions of your website potentially still exist on millions of browsers/routers/ISPs across the Internet. (When your new website goes live, and your developer annoyingly tells you that it can take hours for it to propagate, this is the reason.)
There is a fix for this, however. TTL stands for time to live (live as in alive, not going live), and it simply specifies how long that cached DNS record is good. This can lead to pretty large lead times. Let’s say your TTL is one hour. That can add up to an hour for each cached version in the chain between you and the website.
The solution is to set a low TTL (especially if you know you’ll be launching a new website). Good developers will have the foresight to see this coming and set a low TTL before launch, reducing the hours down to minutes and seconds.
Conclusion (Plus Bonus Tools)
DNS can be a complicated affair, but like most things technical, it’s predictable and consistent. A little understanding and experience can result in a lot of confidence.
As a bonus, here are a few tools to include in your website arsenal:
ICANN Lookup: Enter a domain in here to find out where the domain is registered (see the registrar section).