DNS A record – everything you need to know

If you don’t want to waste time and read the 50+ pages of DNS A record’s RFC 1035, you came to the right place. Here we will show you everything you need to know about this DNS record in brief. 

DNS explained in seconds

From the users’ perspective, you want an easy way to get to the websites on the internet. You simply type the domain name, and you are not worried at all about how to get to the web hosting that has the information for the domain you required. 

From the backend, your request will search the answer of where actually is located the domain name in the domain space. Requests will follow to the root server, who will send to the TLD server, that you will get directed to the authoritative name server for the domain, and finally, your device will ask the last stop, the authoritative name server for the IP address of the web hosting, get it and open the site. 

The last step, where the IP address is requested, is where the A record comes in. 

DNS A record 

DNS A record is a DNS resource record that has the task to link the domain name to an IP address (IPv4). When a user desires to visit a website, its browser will need to get exactly the A record to know where the site is hosted and access it. 

The IPv4 address inside the A record is a 32 bit one that has 4 combinations of numbers and looks like this: 192.1.0.51. 

One host can have multiple A records. That way, a request for a domain name can lead to different locations for the purposes of faster DNS resolving, load balancing, and redundancy. 

To add A records, you will need to be able to manage your domain name and create a DNS Master Zone. Inside it, you can add them with the domain name and the IP addresses. 

A record dissected

One A record will have the following pieces of information inside: 

  • Host: That will be the hostname like yourdomain.com. You can have multiple A records for that host.
  • Type: A, defining the type of DNS record. 
  • To: Here, it will be the IPv4 address of the host written above. Example 195.123.12.1. You put just a single IPv4 address in this field. If your domain is available on multiple IP addresses, you will need to add multiple A records.
  • TTL: Time to live for the DNS record in seconds. It indicates for how long the data is valid before a new query should be made. 

How to see an A record?

You can’t simply see it in your browser, but there are very easy ways to check it, no matter your computer’s OS. 

Windows 10 users

Open the Command Prompt by pressing “Windows key + R”, and inside the Run, write “cmd”. Press the Enter button, and it will open. 

Inside the Command Prompt, write:

nslookup yourdomain.com

You will get the A record for the domain, where you can see the IPv4 address and TTL value. 

*replace yourdomain.com with the domain you prefer

macOS and Linux (Ubuntu, Debian, Linux Mint, etc.)

Open the Terminal. On macOS, it is inside the Applications; on Linux is usually in the System application. 

Type the following: 

dig yourdomain.com

Among other information, you will see the IP address of the domain and TTL. 

*replace yourdomain.com with the domain you prefer

Conclusion 

From this article, you need to remember that the A record maps a domain name to an IP address (IPv4). You can have multiple A records for the same domain, and you can create them inside the Master zone (Primary zone).

Leave a Reply

Your email address will not be published. Required fields are marked *