DNS records, or zone files, are like road signs directing traffic to your website. They’re stored in authoritative DNS servers like Namecheap, GoDaddy, Cloudflare, etc. These records ensure your domain is easily found online by linking it to the correct IP address and handling different types of requests.
Understanding DNS is essential for a webmaster. It ensures your domain is consistently accessible online. Additionally, it allows you to optimize website performance through load balancing and secure email routing, integrate content delivery networks for faster loading times, and enhance website security with DNSSEC.
In this blog, we’ll explain how DNS records work and how to check their propagation status. We’ll also guide you on setting up and managing DNS effectively using DNS Made Easy and through Namecheap.
Understanding Different Types of DNS Records
While there are over 30 types of DNS records available, only a select few are commonly used. Below, we’ll discuss the most practical ones you’re likely to encounter, along with their descriptions and purposes.
A Record
Description
The A (Address) record is a type of DNS record that maps a domain name to its corresponding IPv4 address. For example, the A record for example.com might map to 192.0.2.1.
Purpose
The primary purpose of an A record is to facilitate the translation of domain names into IP addresses, enabling users to access websites using human-readable names rather than numerical IP addresses.
AAAA Record
Description
The AAAA (Quad-A) record is similar to the A record but maps a domain name to an IPv6 address instead of an IPv4 address.
For instance, the AAAA record, “example.com,” might map to 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
Purpose
The AAAA record enables the resolution of domain names to IPv6 addresses, supporting the growing use of IPv6 in modern networks.
CNAME Record
Description
The CNAME (Canonical Name) record is used to map one domain name to another domain name. For example, “www.cloudways.com” could be mapped to “cloudways.com.”
Purpose
The primary purpose of a CNAME record is to create a domain, allowing multiple domain names to point to the same IP address without needing multiple A or AAAA records.
MX Record
Description
The MX (Mail Exchange) record specifies the mail servers responsible for receiving email on behalf of a domain. For example, “cloudways.com” might point to “mail.cloudways.com”.
Purpose
MX records direct emails to the correct mail servers for a domain. For example, an MX record for “example.com” might point to “mail.example.com” as the server responsible for handling emails sent to addresses at “example.com.”
TXT Record
Description
The TXT (Text) record allows domain administrators to store text-based information in the DNS.
An example of a TXT record might be used for SPF (Sender Policy Framework), like v=spf1 include:_spf.cloudways.com ~all.
Purpose
TXT records are used for various purposes, including email validation, domain verification, and providing human-readable information about a domain.
NS Record
Description
The NS (Name Server) record indicates the authoritative name servers for a domain.
For example, an NS record for “cloudways.com” might point to “ns1.cloudways.com” and “ns2.cloudways.com”.
Purpose
NS records tell computers which servers handle requests for a specific website. For example, “example.com” might point to servers named “ns1.example.com” and “ns2.example.com.”
PTR Record
Description
The PTR (Pointer) record maps an IP address to a domain name, essentially the reverse of an A or AAAA record.
For example, the PTR record for the IP address 192.0.2.1 might map to cloudways.com.
Purpose
PTR records are primarily used for reverse DNS lookups. They help verify a host’s identity by resolving its IP address back to its domain name.
SRV Record
Description
The SRV (Service) record specifies the location of servers for specific services, including the hostname and port number.
For example, an SRV record for the “service _sip._tcp.cloudways.com” might point to “sipserver.cloudways.com” on port 5060.
Purpose
SRV records are used to locate services such as VoIP, instant messaging, and other internet services, enabling clients to find the appropriate servers for specific services.
SOA Record
Description
The SOA (Start of Authority) record contains administrative information about a domain, including the primary name server and the domain administrator’s email address.
For example, an SOA record for “cloudways.com” could be “ns1.cloudways.com”, “admin.cloudways.com”, with the serial number “2024:05:31:01”, refresh interval of 3600 seconds (1 hour), retry interval of 900 seconds (15 minutes), expiry interval of 1209600 seconds (2 weeks), and a minimum TTL (Time to Live) of 86400 seconds (1 day).
Purpose
The SOA record is crucial for DNS zone management, providing essential information for zone transfers, and ensuring consistency and coordination between primary and secondary name servers.
Get Your Website Live Faster with Cloudways DNS Made Easy.
Manage domains for just $0.50/month and gain complete control over your website’s online presence.
How DNS Records Work?
The Domain Name System (DNS) relies on a number of records to function. These records act like instructions, telling the system how to translate human-readable domain names like google.com into machine-readable IP addresses like 142.250.184.196.
But how exactly does this process unfold?
DNS Query Process
Step 1: Initiating the Query Process
It all starts with a user. When you type a domain name into your web browser, your computer initiates a DNS query. This query essentially asks, “What is the IP address for this domain name?
Step 2: Querying the DNS Resolver
Your system doesn’t always have answers available on the spot, so it sends the query to its designated DNS resolver. This resolver acts like a middleman, starting the search for the IP address.
Step 3: Contacting Root Nameservers
The resolver doesn’t necessarily know the answer itself. It begins by contacting a root nameserver, the highest level in the DNS hierarchy. The root nameserver doesn’t contain IP addresses but points the resolver towards the appropriate top-level domain (TLD) nameserver (like .com or .org).
Step 4: Accessing TLD Nameservers
The resolver then contacts the TLD nameserver, which in turn directs it to the authoritative nameserver responsible for the specific domain you requested (e.g., google.com’s nameserver).
Step 5: Retrieving the IP Address
Finally, the resolver reaches the authoritative nameserver, which holds the domain’s DNS records. This nameserver checks its records (like A records for IPv4 addresses) and finds the corresponding IP address for the requested domain name.
Step 6: Returning the IP Address
The authoritative nameserver sends the IP address back to the resolver.
Step 7: Connecting to the Website
The resolver then relays the IP address back to your computer. With the IP address in hand, your computer can now connect to the web server hosting the requested website.
What Is DNS Lookup and Why Is It Important?
DNS lookup is the process of querying a Domain Name System (DNS) server to translate a domain name into its corresponding IP address. This translation is important for internet communication, enabling devices to locate and connect to websites, servers, and other online services.
What Are the Types of DNS Lookup?
Let’s now discuss the two major types of DNS lookup.
Forward DNS Lookup
This is the most common type of lookup. It’s the process we described earlier, where a user enters a domain name (e.g., wikipedia.org), and the DNS system translates it into the corresponding IP address, allowing the user’s computer to connect to the website.
Reverse DNS Lookup
Reverse DNS lookup works the other way around. Given an IP address, a reverse DNS lookup attempts to find the associated domain name. Network administrators typically use this to troubleshoot or identify the source of suspicious emails.
DNS Propagation Time
Even after updating your DNS records, it might take some time for the changes to reflect everywhere on the Internet. This is because most resolvers cache DNS records for a certain period, defined as the TTL—Time To Live value in the DNS record itself, to improve efficiency. This cached information must expire before the new, updated records are fetched.
The propagation time can vary depending on the TTL value set for the records and how often different resolvers refresh their cache. It typically takes anywhere from a few minutes to 48 hours for the changes to be fully propagated globally.
How to Set Up DNS Records with Your Domain Registrar?
Although accessing the DNS management panel may differ depending on the service provider, the process of creating a DNS record is generally similar across different platforms. In this example, we will use the domain ‘cloudways.icu‘ hosted on Namecheap.
Step #1 – Access your DNS Management Panel
- Log in to your Domain Registrar Panel.
- Select your target domain, for example, YourDomain.com, and visit the DNS management section.
Step #2 – Create an A Record
Create your new A records here:
Point the following A Record if you want to point a root domain (yourdomain.com) to the IP address. For example:
Type: A
Host/Name: @ or blank
Value/Target: Your IP address (available in application information)
TTL: Automatic/Default or select of your choice
Note: Make sure to save all the changes. Once you have added or updated the DNS records, it may take up to 48-72 hours for your changes to be effective across the internet.
How to Check DNS Records Propagation Status?
You can check the status of your DNS records or particular A Records propagation using any third-party tool such as whatsmydns.net.
Most DNS registrars often take 48 to 72 hours for DNS propagation. On the other hand, Cloudways’ DNS Made Easy makes any changes you make to your DNS records relatively quicker.
This means there is a minimum wait time around for updates to take effect, so your website visitors are always directed to the right place.
Moreover, Cloudways DNS Made Easy allows you to manage your DNS records alongside your web applications, streamlining the process and keeping everything in one place.
Learn more about DNS Propagation
Setting up DNS Records on Cloudways With DNS Made Easy
Here’s how you can add domain(s) to manage them using DNS Made Easy on Cloudways:
Step #1 – Add Domain(s)
- The first step is to add your domain to add the A records.
Note: If your domain has already been added to Cloudways, you can skip to the next step.
- First, click “Add Domain”.
- Next, enter your domain. If you want to add multiple domains, you can click “Add Domain” and add up to 10 domains in bulk.
- Next, click “Save Changes”.
- Once your domain is added, it will appear as ‘Inactive’.
- Now, you need to add the DNS Made Easy nameservers in your DNS registrar panel. The DNS registrar is the company from where you purchased your domain.
- Click “Configure Nameservers”.
- After you click on “Configure Nameservers,” you’ll find the nameservers that must be copied and added to your DNS registrar panel.
- If your DNS registrar restricts the number of nameservers you can add, we recommend using the maximum number permitted.
- The domain I’m using was purchased from Namecheap, so we are adding these nameservers to Namecheap.
- After adding the nameservers, please allow 24-48 hours for them to propagate across the network.
- Once propagation is complete, your domain will display an ‘Active’ status.
- After the nameservers have propagated, the next step is to manage your domain from the Cloudways Platform and add the necessary DNS records to make your website(s) live.
Step #2 – Add A Records
- First, click the ⋮ (ellipsis) icon to reveal more options and click “Manage Records.”
- Next, click “Add Record”.
- Next, you can start adding the necessary A records. First, select “A Record” as the record type.
- Now, enter all the required information according to your chosen record type. For example:
- Type: A
- Host/Name: @ or blank
- Value/Target: Your IP address (available in application information)
- TTL: Default or select of your choice
- Finally, click “Save Changes.”
You’ve effectively set up and included an A record using Cloudways and DNS Made Easy. Now, your DNS records should propagate across the network much faster than the 24-48 hours typically required by most domain registrars.
Troubleshooting DNS Issues
Troubleshooting DNS issues can involve several steps, from verifying the problem to implementing a solution.
Here are commands commonly used across Unix/Linux systems and Windows Command Prompt, along with sample outputs for typical troubleshooting tasks:
1. To Verify Connectivity
A simple way to check connectivity is by pinging a well-known website like Google.
Command
ping google.com
Sample Output
PING google.com (172.217.16.206): 56 data bytes 64 bytes from 172.217.16.206: icmp_seq=0 ttl=117 time=22.897 ms
2. Flush the DNS Cache
Outdated cache entries can sometimes cause problems. Here’s how to flush the DNS cache on different operating systems:
Command
- Window:
ipconfig /flushdns
- Mac/Linux:
sudo systemd-resolve --flush-caches
Sample Output For Windows
Successfully flushed the DNS Resolver Cache.
3. Use nslookup to diagnose
The nslookup command is a handy tool to check DNS resolution. Open a command prompt or terminal and type:
Command
nslookup google.com
Sample Output
This will display the IP address associated with “google.com” and the DNS server used for the lookup. You can use nslookup to verify if your device uses the configured DNS server.
4. Verify DNS Server Configuration
Ensures the DNS server settings are configured correctly on the local machine or router.
Command
cat /etc/resolv.conf
Sample Output
nameserver 8.8.8.8 nameserver 8.8.4.4
5. Verify DNS Server Reachability
Ensure that the DNS server is reachable from your network.
Command
telnet 8.8.8.8 53
Sample Output
Trying 8.8.8.8... Connected to 8.8.8.8. Escape character is '^]'.
Conclusion
In this guide, we’ve covered all you need to know about DNS records! From understanding the basics of DNS records, such as A, CNAME, MX, and TXT, to setting them up step-by-step, we’ve covered essential ground to ensure your website runs smoothly and efficiently.
While other domain registrars like GoDaddy and Namecheap offer DNS management, Cloudways DNS Made Easy lets you control your DNS management and web applications together, making the process easier and keeping everything in one place. Check out alternatives to Godaddy if you are on a search of web hosting.
Also, it’s worth mentioning that Cloudways with DNS Made Easy reduces propagation times, which helps your website run smoothly.
A) Yes, you can perform DNS record lookups for subdomains just like you would for primary domains.
Q) What are DNS records?
A) DNS records are like instructions for the internet. They tell computers how to find websites by translating user-friendly domain names into numerical IP addresses that computers understand.
Q) What are the 8 DNS records?
A) The eight most common DNS records are:
- A Record
- AAAA Record
- CNAME Record
- PTR Record
- NS Record
- MX Record
- SOA Record
- TXT Record
Q) What are the five DNS record types?
A) A record: Translates a domain name to a website’s IPv4 address.
AAAA record: Similar to A records, but for newer IPv6 addresses.
CNAME record: Acts like a nickname, pointing a domain to another domain name.
MX record: Directs emails to the right servers for a domain (tells email where to go).
NS record: Identifies the servers managing a domain’s DNS information.
Q) How to query DNS records?
A) On Windows, you can use the nslookup command. You can specify the record type or query for all records, and On Linux or Mac, you can use the dig command. It is similar to nslookup but offers more options and flexibility.
Inshal Ali
Inshal is a Content Marketer at Cloudways. With background in computer science, skill of content and a whole lot of creativity, he helps business reach the sky and go beyond through content that speaks the language of their customers. Apart from work, you will see him mostly in some online games or on a football field.