Both A record and PTR record are performing fundamentally important purposes. Let’s explain a little bit more about them.
A record
The A record is a popular and commonly used DNS resource record. Its primary duty is to connect the domain name to its corresponding IP address (IPv4). Therefore, every time a user types in its browser and desires to visit a certain website, it is going to need precisely the A record. Thanks to that, it is going to be able to reach it.
The A record contains inside the IPv4 address. It is a 32-bit address with 4 combinations of numbers, for illustration, 12.34.56.123.
One host may have more than one A record. In such a situation, the request for the domain is going to point to multiple places. That way, the DNS resolution is going to be faster.
It is simple and easy to create your A record. Note that it has to be in your Primary (Master) DNS zone.
Structure
The A record has an uncomplicated structure:
- Host: Type your hostname, like domain.com. You can have more than one A record for this host.
- Type: Here, you establish the type of DNS record. In this example, it is A.
- To: Type here the IPv4 address, for illustration, 12.34.56.123. In this field, place just one IPv4 address. If your domain has several IP addresses, you should create several A records.
- TTL: Here is the time-to-live value in seconds. It specifies for how long the DNS record is valid.
PTR record
The PTR record or pointer record is also a type of DNS record. It serves with linking an IP address (IPv4 or IPv6) to a domain name. With its help, it is possible to demonstrate that the exact IP address is rightfully connected to the domain name. When third parties inspect it, the PTR record provides confirmation that there is no fraud. Thanks to the pointer record, validating the additional elements or services, such as a mail server, is an easy task.
Structure
The pointer record is not so complicated either. So, if you have to make one, you are going to view the following fields:
- TYPE: In this situation, it is going to be PTR.
- Host: In this field, you should place the IP address. It works with an IPV4 address and an IPv6 address.
- Points to: In this field is your domain name.
- TTL: In this field, you establish the TTL (time-to-live) value of the pointer record.
A record and PTR record – comparison
When we compare the A record and PTR record, you are going to notice that they are actually the opposite of one another. This is because the A record connects a particular domain name to an IP address (IPv4). On the other hand, the PTR record is resolving an IP address (IPv4 or IPv6) to a domain name.
In addition, it is important to note for the A record and PTR record that they exist in completely different DNS zones. The A record should be created into a Primary (Master) DNS zone, and the PTR record is capable of existing and operating only in a Master Reverse DNS zone.