A record, the king of the DNS records

Domain name system (DNS) makes the Internet experience easier for everybody, visitors, and websites’ owners. But if you take a look at its “backstage”, it’s a complex show to run. Many different actors are involved. Hosting, domain names, registers, data, IP addresses, DNS records…

DNS records are some of those important components. They are simple and brief messages, instructions for DNS servers to execute specific tasks. The syntax and commands DNS records contain allow servers to know which IP address is associated with a specific domain name, where to direct a query, the way they (servers) should answer a query, the time they should keep it, etc.

What is an A record?

The letter A means address. The A record links a domain name to an IP address version 4 (IPv4). Rephrasing, A record points the specific domain requested by the user to its proper location via the correct IP address. 

This is the most basic DNS record that exists, but it is vital to your DNS configuration. It is probably the most used record in DNS zones. Besides its specific functionality, if you use different A records for a single domain, you get redundancy. 

It’s a basic component, but its role is critical for servers to answer queries. That’s why it is the king of DNS records. Without it, there is no DNS. 

Format of the A record

There is a standard established that defines this record’s structure as follows.

Resource data (RDATA) includes only one element, address, represented like A <address>.

The components of that address are customizable.

  • Host: yourdomain.com
  • Type: A
  • Address (IPv4): 195.126.31.1 (ip.of.the.site) 
  • TTL: Time-to-live period.

How to query an A record?

If you need to know the A record linked to a domain name, you have these choices.

For Linux and macOS

The easy way is to use dig. Dig is a network command to ask DNS (name servers) for the A record. 

  1. Just open the Terminal.
  2. Type dig command, followed by the domain name you want to check: “dig yourdomain.com”.
  3. It will provide you different interesting info, but if you go to the answer/result section, you will get: the domain name (FQDN), the current TTL, and the IP address.

For Windows

  1. Here, we don’t have the Terminal, so we need to open the Command Prompt. 
  2. Inside it, we will use nslookup command. 
  3. Type “nslookup yourdomain.com”, and press Enter. 
  4. You will see the A record and the host’s IP address. 

* Change the yourdomain.com with the one you want to check.

How to set up an A record?

Creating an A record means to give it value. Through your DNS control panel, create a Master DNS zone, and there find the “add DNS record”, followed by “A DNS record”. In it, define the IP address to where the domain must direct and the TTL. An A records can just point to IP addresses, no other info.

It is possible to direct a domain to different IP addresses. You have to add another A record keeping the same domain name but filling it with a different IP address and setting a load balancing mechanism.

Suggested article: What is a PTR record and do I need to create one?

Conclusion

The A record is the king of the DNS records. It is a basic component of the DNS world, but it has a big responsibility. To find easily and fast something on Internet would be a titanic or impossible mission without knowing its exact location (address).

Leave a Reply

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