Reverse DNS and PTR Records for Email: Setup Guide
What a PTR record is, why Gmail expects reverse DNS on sending IPs, and how to set it up and test it.

A PTR record is the DNS entry that connects an IP address back to a hostname. It is the reverse of an A record. When your mail server sends a message, the receiving server often looks up the PTR record of your IP to see who is knocking. If there is no record, or it points to a hostname that does not match, your email may be rejected or filtered as spam.
This guide explains what a PTR record is, why it matters for email deliverability, how to set up reverse DNS and how to test it. You do not need to be a network engineer. You do need access to whoever controls your sending IP address.
What is a PTR record?#
DNS usually works in one direction. You type a name, and DNS returns an IP address. That is a forward lookup, and an A record (for IPv4) or AAAA record (for IPv6) answers it.
A reverse lookup works the other way. You ask for the name that belongs to an IP address, and the PTR record answers. The name "PTR" stands for pointer. Reverse DNS is the common name for this system, and the specification behind it is part of the core DNS standards.
For example:
- Forward:
mail.example.com→203.0.113.25(A record) - Reverse:
203.0.113.25→mail.example.com(PTR record)
When both directions agree, the setup is called forward-confirmed reverse DNS. Mail servers like this match because it shows the owner of the IP and the owner of the name are the same party.
Why does a PTR record matter for email?#
Spammers often send from IP addresses with no reverse DNS, or with generic names set by an internet provider. So receiving servers treat a missing PTR record as a warning sign.
Google states the rule plainly in its email sender guidelines: the public IP address of a sending SMTP server must have a corresponding PTR record that resolves to a hostname. That hostname must have a matching A or AAAA record that points back to the same sending IP.
Other mailbox providers have similar checks, even when they do not publish them in the same detail. A correct PTR record will not fix a bad sender reputation. But a missing one can cause problems that no amount of good copy can solve.
What does a correct PTR record look like?#
A healthy setup has these traits:
- The IP has a PTR record. A lookup returns a hostname.
- The hostname resolves back. An A or AAAA lookup of that hostname returns the same IP.
- The name is yours. It uses a domain you control, not a generic provider hostname.
- The name is stable. You do not change it every week.
- The mail server greets with the same name. The hostname in the SMTP greeting (HELO or EHLO) matches the PTR hostname where you can arrange it. This is a common recommendation, and it is covered in the SMTP standard, RFC 5321.
One IP should usually have one PTR record. Several records on a single IP can confuse some receivers.
Who can set a PTR record?#
This is the part that surprises people. You cannot create a PTR record in your own domain's DNS zone. The reverse zone belongs to whoever owns the IP address block. That is usually your hosting company, cloud provider or internet provider.
So the process is:
- Email service provider (ESP). If you send through a shared platform, the provider manages reverse DNS for you. You have nothing to configure.
- Dedicated IP from an ESP. The provider usually sets the PTR record for you, sometimes on request.
- Your own server or cloud VM. You set the PTR record in your provider's control panel or by opening a support ticket.
How do you set up reverse DNS step by step?#
Use this routine if you run your own sending server.
- Pick the hostname. Choose a name in your domain, such as
mail.yourcompany.com. - Create the forward record. Add an A record (and AAAA for IPv6) that points the hostname to your sending IP.
- Request the PTR record. In your hosting panel, find the reverse DNS or PTR setting for the IP and enter the hostname. If no setting exists, contact support.
- Wait for DNS to update. Changes can take some time to spread.
- Match your mail server config. Set the server's hostname and HELO name to the same value.
- Test it. See the next section.
- Repeat for each IP. Every sending IP needs its own record.
How do you test a PTR record?#
You can check reverse DNS with the standard DNS lookup tools that ship with your operating system, or with an online reverse DNS lookup.
- Look up your sending IP in reverse mode. It should return your hostname.
- Look up that hostname in the normal way and confirm it returns the same IP.
If both directions match, you have forward-confirmed reverse DNS. Replace the example IP with your own.
You can also send a test message to a mailbox you control and look at the headers. Gmail shows authentication results and the sending IP in the original message view. Many deliverability tools run the same checks, and the Tomba blacklist checker helps you see whether your IP is listed anywhere.
How does a PTR record fit with SPF, DKIM and DMARC?#
They are separate layers.
| Check | What it proves |
|---|---|
| PTR record | The IP has a matching, named identity |
| SPF | The IP is allowed to send for the domain |
| DKIM | The message was signed by the domain and not changed |
| DMARC | The visible From domain aligns with SPF or DKIM, and tells receivers what to do on failure |
You need all of them. Check your SPF record with the SPF checker, and test your sending server with the SMTP tester.
Common PTR record mistakes#
- No record at all. Common on fresh cloud servers.
- Provider default name. Something like a long string of numbers. It works, but it does not look like your brand.
- Mismatch. The PTR hostname resolves to a different IP.
- Multiple names. Several PTR records for one IP.
- Forgetting new IPs. You add a server or an IP and skip reverse DNS.
- Changing IPs without updating. After a migration, the old setup lingers.
Frequently asked questions#
Do I need a PTR record to send email?#
If you run your own sending server, yes. Gmail requires it for sending IPs. If you use a hosted email platform, the provider handles it.
Where do I add a PTR record?#
With the owner of the IP address block, usually your hosting or cloud provider. It is not part of your normal domain DNS zone.
Is a PTR record the same as reverse DNS?#
Yes. The PTR record is the entry. Reverse DNS is the lookup that uses it.
Can a PTR record improve my sender reputation?#
It removes one reason to be filtered. Reputation depends on many other signals, such as complaints, engagement and list quality.
Keep your sending list clean too#
Correct DNS gets you to the door. Clean data gets you inside. Verify every address with the Tomba Email Verifier before you send, and create a free account to try it.
// start free
See who Tomba finds at any company
Type a company's domain to see its people, their roles and verified work emails, each with the pages it was found on. Free account, no card.
Free plan · No credit card required · GDPR & CCPA
// about the author