How to Add PTR Records to Cloudfare
You might need to add a PTR if you’re thinking about email marketing or if you just want to protect yourself against spam from potentially fraudulent domain names. PTR records are mainly used for security and verification purposes. Servers will use these records to ensure emails come from where they’re supposed to. It helps to filter spam and prevent problems. Hence, it’s helpful to create a PTR record, especially if you’re a business relying on email.
This article will explain how to add PTR records to Cloudflare.
Adding a PTR Record
The primary uses for PTR records include the following:
- Email applications may use reverse DNS to determine whether or not the IP address from which the email is sent is legitimate. So anti-spam is a big reason. In fact, some of the larger email providers (including Yahoo! and Gmail), for instance, do reverse DNS checks before accepting incoming emails.
- Besides, email services could prevent emails from a domain if there isn’t a PTR set up. That’s a big problem if you’re a company using or relying on email marketing. For that reason, you can use the PTR for troubleshooting purposes.
- Finally, reverse DNS can help to convert logged domains in the system to be more “human-readable,” making PTR records useful for logging.
Whether using a PTR record for anti-spam, troubleshooting, or logging, you must follow some specific steps to add it.
Adding Your PTR Record
Before you can create your PTR record, you have to set up a reverse DNS. Then, you can move on to setting up the PTR record function.
Create the Reverse DNS
To do this, follow the steps that are listed below:
- Click on the button “Add Site.”
- Enter and Use a reverse IP address for your website.
- Cloudfare lists the prefixes for IPv4/24 prefixes as:
IP: <octet_1>.<octet_2>.<octet_3>.0/24 and
Reverse Zone Address: <octet_3>.<octet_2>.<octet_1>.in-addr.arpa
- If you are using IPv4 /16 prefixes, the pattern Cloudfare provides is:
IP prefix: <octet_1>.<octet_2>.0.0/16
Reverse zone address: <octet_2>.<octet_1>.in-addr.arpa
So to provide an example:
If your IPv4 prefix is 184.108.40.206/24, your reverse zone would be 100.23.198. in-addr.arpa
If you’ve followed these steps correctly, you’ve successfully set up the reverse DNS.
PTR Record Function
The next step you need to take is to add the PTR record function. To do so, follow the instructions below:
- Head over to DNS.
- You will click ” Records ” under the DNS section.
- As per Cloudfare’s instruction, you will need to add a PTR record.
Here is an example that Cloudflare provides of a configuration:
Reverse zone: 100.51.198.in-addr.arpa
IP address: 198.51.100.123
The PTR record on the subdomain would be 123, making the full domain for forward lookup 220.127.116.11.in-addr.arpa.
- Once this step is complete, be sure to add the Cloudflare name servers to your Regional Internet Registry (RIR).
Now you’ll be able to perform reverse DNS lookups.
My PTR Records Are Missing
You should call your web hosting provider if you can’t locate your PTR records. If they don’t have the answers you need, try contacting your email service provider and ask them about adding a PTR record to your reverse DNS zone.
You can’t add your own PTR record since you typically don’t have control over the reverse DNS zone associated with your domain. However, if you own the DNS, you must create a PTR record.
Developers and system administrators usually recommend managing the email service if you have previous experience. The reason being, emails are an easy way for hackers to send and spread spam. You might put yourself at risk by doing it by yourself. Instead, it might be easier to check out an email provider who is better equipped to handle the setup.
Stored PTR Records
If you’re wondering how your PTR records are stored, it depends on whether it is in IPv4 or IPv6.
In IPv4, PTR records are stored under the IP address (reversed) with a “.in-addr.arpa” at the end of the IP address. If the IP address is 18.104.22.1688, it would be stored as “222.214.171.124.in-addr.arpa.”
The “.in-addr.arpa” is an additional extension because PTR records are within the .arpa top-level domain. But perhaps an interesting fact you might not know: “arpa” is abbreviated as such since it derives from the Advanced Research Projects Agency (ARPA), an important antecedent to the development of the internet. So that’s why you see the “arpa” extension there.
IPv6 addresses aren’t stored in the same way. They’re reversed and converted into four-bit sections using the “.ip6.arpa” extension.
Where can I find support?
If these options don’t work for you, you can always reach someone through the community and ask another member if you have a question you need help with.
Adding PTR Record to Cloudfare
Adding PTR records to Cloudfare is a technical process, but can be accomplished if you’re well-informed. Setting up a PTR record is something you need to do. It ensures your emails are sent correctly (not the recipients’ spam folders). Besides, suppose you don’t have a PTR record. In that case, your email messaging won’t ever reach the intended recipient as the mail server will reject it. But don’t worry. If you need help, you can always check Cloudflare’s support options.
Have you ever added a PTR record to Cloudflare? If so, did you use any of the tips and tricks featured in this article? Let us know in the comments section below.