Domain management and understanding DNS records.
In this lesson, we peek behind the curtains of the vast network of computers we call the internet.
We'll learn about domains, DNS, how it connects your domain name with your hosting provider's IP address, and how to manage these settings.
We will answer the following questions.
What is a domain?
What are DNS records and what do they do?
How do you edit them and how long does DNS propagation take?
Firstly, what is a domain?
A domain name is the unique address people use to access your website on the internet.
Like your actual address, anyone who wants to visit or send you a letter needs to know on which street you live and what's your house number.
The web works similarly.
People can type your domain into their web browser address bar or use a search engine.
Domains consist of two, sometimes three parts.
The name, the extension, and sometimes a prefix called subdomain.
Here is an example.
In the domain, WordPress.org.
WordPress is the unique name chosen by the website owner and .org is the domain extension, denoting the type of website or organization.
Meanwhile, in the domain learn.wordpress.org, learn is a subdomain associated with the primary organization that indicates the site's focus on educational content.
Unlike humans, devices and servers communicate using numerical IP addresses.
And that's where the domain name system or DNS comes in.
What is DNS?
The domain name system or DNS bridges the gap between humans and machines, translating human readable domain names such as www.example.com into machine readable IP addresses like 192.0.2.1.
Imagine a giant phone book that stores all the names and corresponding numbers of every active website and online service in special text files.
These files are called zone files and they contain the individual DNS records of each website on which server to find it, how to connect to it and more.
These DNS records, unique to every domain, are grouped in a DNS zone.
There are a few dozen DNS record types.
Let's review the five primary records that are essential for your website.
Number one, NS records, short form nameserver.
These records tell other computers which server manages the information about your website.
NS records direct the network traffic to where your website, mailbox and other online assets are stored.
Every domain must have NS records.
You'd usually have two of them, so if one nameserver is down, the domain lookup process can use the next NS indicated in the records.
Why would you need to edit your nameservers?
The most common scenario is when using one company to manage the domain and another to manage hosting.
If you've purchased your domain at registrar A and a hosting plan at provider B, you need to connect the domain to your hosting using NS records.
Here's how this usually works.
Firstly, you find provider B's nameserver.
It might look something like ns1.dns-parking.com.
You copy them.
Next, go to registrar A's control panel and find the DNS zone management section.
And then thirdly, remove the old NS records and add the new ones you copied in the first step.
Your domain will soon be connected to your hosting.
Next, let's talk about A records, short for address record.
It ensures that when somebody tries to visit your website from a browser, whether via a search engine or directly typing example.com, the browser would know which server manages this IP address.
Once it has this information, the browser can fetch the files and display the website.
If you're using your web host's nameserver, you probably won't need to set an A record.
Your web host will do this for you.
Thirdly, CNAME records.
Think of the canonical name records as shortcuts for your website.
These aliases let you point one domain name to another, which is how you would set up subdomains or direct traffic to a different web address.
The most common useful CNAME is www.
This record works like an email forwarder and ensures people can access the website whether they include the www or not.
Alternatively, you can use a CNAME to direct visitors to a separate website, like the example of learn.wordpress.org.
Next, MX records.
The mail exchanger records handle the mailboxes of your domain.
They specify which servers handle emails sent to and from your custom email addresses, including email forwarding.
If you want to use your domain to send and receive emails, for example the email account info@example.com, you need to set MX records.
Number 5. TXT records.
TXT records are like sticky notes attached to your domain.
They can contain all sorts of helpful information, like verifying your domain for analytics, services or optimizing email security.
Here's an example of the latter.
The next question is how do you edit these records?
You can manage all these different DNS records via your domain registrar or hosting providers control panel.
They interface changes from one company to another, but they all allow you to create, modify and delete DNS records and configure your domain according to your requirements.
You might be asking, how long does it take?
Whenever you make changes in your DNS zone, global DNS servers across the entire web need to update the records they have stored.
This process of DNS servers updating their records is called propagation.
Various factors affect the time it takes to complete this update, so expect anything from a couple of hours and up to 72 hours.
Take that into account when you make these changes.
You can check the status of DNS propagation on sites like DNS checker.
Type your domain, select the record and test it across hundreds of DNS servers worldwide.
We hope this short overview gives you a better understanding of domains and DNS management and helps you adjust some default settings to your needs.