Without the Domain Name System, users of the World Wide Web would have serious problems when trying to load websites and other online presences. It’s only thanks to this system that internet addresses appear in their trusted text format: they’re actually nothing more than combinations of numbers. The communication between browser and name server responsible for this isn’t actually as secure as you...
Using the Domain Name System (DNS), users can enter an easy-to-remember domain in the browser’s address line – instead of having to memorise IP addresses. The DNS in turn functions by means of DNS records. It is these standardised records that enable you to perform a name resolution.
There are many different DNS record types, which in turn complete various tasks. You can find an overview and a detailed explanation of DNS records and how they work in our DNS records overview.
The A record is probably the most important and also most frequently used type of DNS record. But what exactly is the purpose of an A record?
A Record Syntax and Functionality
The A record enables that which most people associate with the DNS: connectinganIP address to a domain name. For this function alone, the record would only need two fields. However, the A record is assigned other properties in the record, which is how the duration of the information’s validity, and the record’s class and type (in this case, A) are specified.
Record Structure & Fields
- <name>: domain name
- <ttl>: time to live (TTL), the duration of the record’s validity
- <class>: network class
- <type>: record type
- <rdlength>: data size
- <rdata>: resource data, IP address
In DNS records, the domain name (web address), for example, is always concluded with a period, which in the Fully Qualified Domain Names (FQDNs) notation also separates the empty root field from the rest. The TTL specifies the time in seconds that the record may remain in the cache. If this period has lapsed, it can no longer be guaranteed that the information is still correct. As a result, the data must be called up again.
The class specifies the network type the record is intended for. However, this is almost always the internet, which is why the IN abbreviation is usually found in this location. The type in this case is A. In the case of an A type, the length is always the same. This is because the size – 4 bytes – doesn’t change. Finally, the last field contains the IP address assigned to the name.
The fields are simply arranged in sequence and are separated by a space. Each record receives a new line. The A record’s syntax thus looks like this:
<name> <ttl> <class> <type> <rdlength> <rdata>
The TTL, class and size fields are optional.
In addition to A records, there are also AAAA records. With these records as well, a domain’s name is linked to an IP address. While the A record refers to an IPv4 address, the AAAA record is intended for IPv6 addresses. In terms of structure, nothing changes. Only the record size is adjusted accordingly – 16 bytes instead of 4. This also explains the name: The quadruple A, or quad A, symbolises the data’s quadruple length.
Example A Record
In practice, an A record looks like this:
www.example.com. 12879 IN A 188.8.131.52
The record begins with the complete domain name including the closing period. The record may be held for 12.879 seconds (so approximately 3.5 hours) in the cache before the information must be requested again. If this field is left empty, a default value is accepted that is inserted at the beginning of the zone file. The class is naturally the internet (IN). The only alternatives would be the Hesiod (with the abbreviation HS) and Chaosnet (with the abbreviation CH) networks, both of which are no longer used. If the field is left empty, the internet is automatically adopted as the class.
In the type field, A record is specified as the type, which is why in this case an A is entered. For this example, the record’s size field is blank. Theoretically, however, it would be 4. Finally, the last field specifies the IP address.
In addition to this type of notation, however, you can also use one based on the use of placeholders:
$TTL 12879 $ORIGIN example.com. www A 184.108.40.206
Placeholders are represented by $ symbols. In this case, the time to live is thus determined globally for the complete file. The domain is also already named at the beginning of the file. In the individual files, only the different sub-domains are to be found. In this example, it is the web server’s address. But mail and FTP servers can also be located among the records.
A Record Check
If you’d like to check the A record (an A record lookup), you can use various services. On the internet, for example, special software can be found which reads out zone files from the server. But you don’t need to install a program. This is because different providers make the record lookup available on their websites. Here are two examples from the Google service.
On the Google Public DNS website, you can simply enter the relevant domain. (Here, a reverse lookup is also possible: You can also find the domain name for a known IP address.)
The information being searched for is located under the Answer element. Here is where you first find the name and type. This is information that you should already know, however, as you’ll have already inquired about the A record for the specific domain.
The type is specified here with a number. The Internet Assigned Numbers Authority (IANA) has assigned every record type a specific value. A is associated with 1, and AAAA with 28.
The TTL and data fields contain the key information. This is where the duration of the information’s validity and the searched IP address are specified.
The options in the upper margin can display other records types – such as CNAME, MX, PTR and SOA. EDNS Client Subnetis a mechanism that displays the correct server depending on the location of the requestor. However, only Google and OpenDNS actually utilise this option at present. DNSSEC guarantees that the user also receives correct DNS information that has not been manipulated by a third party.
If you would rather use a service other than Google, you have other options to choose from, such as Norton ConnectSafe, Cloudflare, and Comodo Secure DNS.