Every website has an IP address that identifies it among all others. Theoretically, you could navigate the web using only IP addresses instead of domain names, but this wouldn’t be practical. To understand how IP addresses and domains relate to each other, you need to get to know the Domain Name System (DNS).
The DNS enables us to navigate the web more intuitively. In this article, we’re going to talk more about what the DNS is and how it works. Then, we’ll introduce you to multiple DNS-related terms you should know and talk about why they’re important. Let’s jump right in!
An Introduction to the Domain Name System (And How it Works)
If you’ve ever used a browser, you know the drill – you type a domain, click enter, and it loads the page you want. It’s a simple process that works even though there are over a billion websites available online.
However, each of those websites also has a unique IP address you can use to move between them. Those IP addresses correspond to the servers that host each website. When you register a new domain, you’re telling the world, “Hey, this URL leads to this particular IP address!”. That way, users don’t need to remember complicated strings of numbers.
The thing is, your browser doesn’t automatically know what domain name leads to each address. It has to check the DNS to see what address it corresponds to before sending you there. This is a system that stores information about which domains and IP addresses are linked.
As you might expect, this is too much information for a single computer to handle. Instead, we’re talking about a decentralized system, with plenty of companies that run their own servers. Google, for example, runs a public DNS server, as does Verisign, and Yandex. Most domain registrars also operate their own ones. Usually, this is down to security and speed concerns, and they often dominate the discussion regarding benefits:
To explain a little more about how the system works, when you register a domain name, it ‘propagates’ the information across all DNS servers. This can take up to 48 hours (hence the oft-repeated warning from registrars).
Your Internet Service Provider (ISP) probably runs a DNS server as well, and your router may be configured to use it by default. Ideally, most DNS servers should work just the same, but there are benefits to using a public one if, for example, your ISP blocks certain websites.
6 DNS-Related Terms You Should Know
If you ever want to register a domain, migrate one, or point it towards a site, you’ll need to deal with the DNS. However, there are plenty of terms you may run across that might sound confusing, so let’s talk about the most popular ones and explain what they are.
1. ‘A’ Records
When you link a domain name to a specific IP address, you’re creating what’s known as an A record. As we explained earlier, these records are at the heart of the DNS. Without them, users wouldn’t be able to find your website through its domain.
2. ‘CNAME’ Records
This is where things start getting a bit more complex. CNAME records don’t point users towards a specific IP address, but instead, towards other domain names.
For example, you can have a CNAME record that points elegantthemes.com to www.elegantthemes.com. This means users will be able to reach the website regardless of whichever address they type on their navigation bar. In the example above, when a visitor types elegantthemes.com, they go to www.elegantthemes.com, which in turn leads to a specific IP address if you configured an A record.
Technically, you could also set up both www and non-www variations of an URL to lead to the same website using A name records. However, you should always aim to use a default or ‘canonical’ domain name to avoid search engines penalizing you for duplicate content.
3. ‘MX’ Records
MX records deal with email specifically. In most cases, when you sign up for a hosting plan, you also get access to free associated email accounts. In these cases, your web host will probably take care of setting up MX records for you. These simply indicate the mail servers that will receive incoming messages and where to route them to.
If your hosting provider or registrar doesn’t offer email hosting, you can always set up MX records pointing to different mail servers.
In most cases, people use the term ‘nameserver’ interchangeably with DNS servers. To be fully accurate, nameservers are computers running DNS software. When you register a domain, you can assign nameservers to it, which in most cases are those run by the registrar you used.
To put it another way, nameservers link your domain’s information to the service you used to register it, be it a hosting company or a registrar. When you migrate a domain, you also need to switch its nameservers and wait for the changes to propagate once more.
5. ‘Zone Files’
Your domain’s zone files include all of its DNS-related settings, and they’re stored within your nameservers. For example, each record associated with your domain goes into your zone file in simple text format, which simplifies its interpretation and migration process.
When you make changes to your DNS settings, you’re updating your zone file. Most changes will generally take place via a graphical interface. However, most registrars and web hosts also enable you to export copies of your zone file for backup purposes.
6. ‘Time-to-Live’ (TTL)
TTL is a setting that tells your nameservers how often it should update your DNS records. For example, if you change your A record and your TTL is set to two hours, it won’t start propagating the update until that time. Most modern registrars enable you to set your TTL settings to low limits, such as one or five minutes.
In practice, you don’t need low TTL times for A and CNAME records – at least in most cases – since you shouldn’t be making changes to them often. However, there are plenty of situations where setting low TTL times can come in handy, so having this flexibility is handy for advanced users.
In short, the DNS is a big part of what makes it possible for us to navigate the web intuitively. It’s important you understand how it works if you’re going to run a website, since you’ll need to deal with it often. For example, registering domains, pointing them towards a site, and migrating them all involve using the DNS, and they’re simple tasks you should be able to do.
Once you know how the DNS works, there are a few extra terms you should get acquainted with, such as:
- A records: These records link your domain name to an IP address.
- CNAME records: With these records, you can point domains towards other URLs.
- MX records: This type of record enables you to receive incoming emails to your domain.
- Nameservers: These are your domain registrar or hosting provider’s DNS servers.
- Zone files: This file stores all your DNS-related information and it’s stored on your nameserver.
- Time-to-live (TTL): With this setting, you can configure how often your DNS configuration is updated.
Do you have any questions about what is the DNS? Let’s talk about them in the comments section below!
Article thumbnail image by Aa Amie / shutterstock.com.
An Introduction to the Domain Name System (And How it Works)
Domains enable us to navigate the web without having to remember long IP addresses for each website. However, many people have no idea how the Domain Name System (DNS) works. In this article, we’ll talk about what is the DNS and how it’s structured!
The post An Introduction to the Domain Name System (DNS) And How it Works appeared first on Elegant Themes Blog.