How do I check if the sending IP address matches the IP address of the hostname specified in the Pointer (PTR) record?

Summary

To verify if a sending IP address matches the hostname specified in the Pointer (PTR) record, the core principle is to ensure Forward Confirmed reverse DNS (FCrDNS) is correctly configured. This involves verifying that the PTR record points to the domain/hostname, and the hostname resolves back to the original IP. This can be achieved using several methods. Online reverse DNS lookup tools like MXToolbox, EasyDMARC, DNSQueries, WhatIsMyIP, Wormly, IntoDNS and Namecheap provide easy checks. Command-line tools such as `dig` (e.g., `dig -x your_ip_address`) and `nslookup` (on Windows, `nslookup <IP_address>`) can also be used to query the IP address and retrieve the hostname. For Bash users, the `nmap` tool has a handy `fcrdns` script to automate this process. Expert advice suggests that a properly configured PTR record should match the corresponding A record, and every smarthost you have needs to have its own hostname, and you need to set up an A record from that hostname to the smarthosts IP address, and a PTR record from that IP address to the hostname. It's also noted that the actual hostname is typically found in the HELO or Received header, but this is not always guaranteed. When dealing with dedicated IPs (DIP), special attention should be paid to ensure manual DNS management doesn't lead to misconfigurations. After any creation or modification of PTR records, it's critical to check for proper propagation. Overall, the key is to confirm a matching, bi-directional resolution between IP and hostname to validate the PTR record configuration.

Key findings

  • FCrDNS Verification: The primary check is verifying Forward Confirmed reverse DNS (FCrDNS), which ensures that forward and reverse DNS records match, showing that the IP resolves to the correct hostname and vice versa.
  • Online Tools Availability: Numerous online tools (MXToolbox, EasyDMARC, DNSQueries, WhatIsMyIP, Wormly, IntoDNS) offer reverse DNS lookup services for PTR record checks.
  • Command-Line Utilities: Command-line tools like `dig` and `nslookup` provide the ability to query IP addresses and retrieve hostnames for verification, `nmap fcrdns` offers bash scripting checks.
  • Smarthost and PTR Records: Each smarthost should have its own hostname, and PTR records should be configured to link the IP back to the hostname, also A records should be in place.

Key considerations

  • Dedicated IP Management: Special attention should be paid to dedicated IP (DIP) configurations due to the potential for manual DNS management errors.
  • Bidirectional Resolution: A properly configured system requires bidirectional resolution: the IP address must resolve to the correct hostname, and the hostname must resolve back to the original IP address.
  • Header Unreliability: Relying solely on HELO and Received headers for hostname verification can be unreliable, as their presence is not always guaranteed.
  • Check PTR Propagation: After creating or modifying PTR records, always verify their proper propagation to ensure DNS is correctly configured.

What email marketers say
12Marketer opinions

To verify if a sending IP address matches the hostname specified in the PTR record, it's essential to ensure Forward Confirmed reverse DNS (FCrDNS) is correctly configured. This involves confirming that the PTR record points to the domain/hostname and that the hostname resolves back to the original IP. Several tools and methods can be employed, including online reverse DNS lookup tools like MXToolbox, EasyDMARC, DNSQueries, WhatIsMyIP, and Wormly. Command-line tools like `dig` and `nslookup` can also be used. For dedicated IPs, manual DNS management is common, making it crucial to verify settings. These tools return the hostname associated with a given IP, which should then be confirmed as matching the original IP. Bash users can leverage `nmap` with the `fcrdns` script for automated checks.

Key opinions

  • FCrDNS: Forward Confirmed reverse DNS (FCrDNS) must be complete: the PTR record must point to the correct hostname, and the hostname must resolve back to the original IP address.
  • Online Tools: Various online tools (MXToolbox, EasyDMARC, DNSQueries, WhatIsMyIP, Wormly) offer reverse DNS lookup to check PTR records by inputting an IP address and verifying the returned hostname.
  • Command Line: Command-line tools such as `dig` and `nslookup` can be used to query the IP address and retrieve the hostname for PTR record verification.
  • nmap Script: For Bash users, the `nmap` tool has a handy `fcrdns` script to check forward-confirmed reverse DNS on an IP.

Key considerations

  • Dedicated IPs: Focus on dedicated IPs, as manual DNS management increases the risk of misconfiguration (e.g., accidental deletion of PTR records).
  • Reverse Lookup: Perform a reverse DNS lookup to find the hostname associated with the sending IP address.
  • Hostname Verification: Ensure that the hostname obtained from the reverse DNS lookup resolves back to the original sending IP address.
Marketer view

Email marketer from Reddit explains to use `nslookup <ip_address>` in your terminal to perform a reverse DNS lookup. The output will show the hostname associated with the IP. Compare this hostname with the expected hostname.

January 2023 - Reddit
Marketer view

Email marketer from DMARCly shares that to check if the sending IP matches the hostname in the PTR record, you need to perform a reverse DNS lookup. You can use online tools or command-line tools like `dig` or `nslookup` to query the IP address and retrieve the hostname. Then, verify that the hostname resolves back to the original IP address.

July 2022 - DMARCly
Marketer view

Email marketer from Email Geeks recommends focusing on clients that have a Dedicated IP (DIP) as those are the ones that may break things because brands can have people who manually manage the DNS, and new folks don't understand why this record is here and delete it.

May 2023 - Email Geeks
Marketer view

Email marketer from WhatIsMyIP explains to utilize the Reverse DNS Lookup tool on WhatIsMyIP.com to enter the IP and verify if the hostname matches the IP address.

December 2021 - WhatIsMyIP.com
Marketer view

Email marketer from EasyDMARC explains that to check the PTR record, use online tools like their own PTR Record Lookup tool. Enter the IP address to see the corresponding hostname. This helps verify if the PTR record is correctly configured and matches the sending IP.

June 2021 - EasyDMARC
Marketer view

Email marketer from DNSQueries shares that they offer a Reverse DNS Lookup tool. Enter the IP address and check if the hostname matches the expected hostname, ensuring proper PTR record configuration.

September 2024 - DNSQueries
Marketer view

Email marketer from Email Geeks shares that a FCrDNS needs to be complete. Where the PTR points to the domain/hostname and the hostname points to the IP.

September 2024 - Email Geeks
Marketer view

Email marketer from MXToolbox shares that MXToolbox offers a Reverse DNS Lookup tool where you can enter an IP address to check the associated PTR record. It will show if the record exists and the hostname it resolves to, helping you ensure the sending IP matches the hostname.

September 2024 - MXToolbox
Marketer view

Email marketer from Email Geeks shares that, for those that like doing things from bash, nmap has a very handy fcrdns script to check forward-confirmed reverse DNS on an IP and provides an example.

October 2024 - Email Geeks
Marketer view

Email marketer from Wormly explains that Wormly offers a tool to check reverse DNS records. You provide the IP address, and it shows the associated hostname, allowing you to verify if it matches the expected hostname.

October 2023 - Wormly
Marketer view

Email marketer from Namecheap shares that you can use online reverse DNS lookup tools to check PTR records, and they also provide some tips on PTR record setups.

May 2021 - Namecheap
Marketer view

Email marketer from StackOverflow explains to use online reverse DNS lookup tools. Input the IP address, and the tool will display the associated hostname. Ensure the hostname matches the IP address.

August 2024 - StackOverflow

What the experts say
4Expert opinions

To verify if the sending IP address matches the hostname specified in the PTR record, the core process involves ensuring Forward Confirmed reverse DNS (FCrDNS). This means starting with the hostname, resolving it to an IP address, and then performing a reverse lookup on that IP to obtain a hostname, which should match the original hostname. Every smarthost needs its own hostname, an A record pointing to the IP, and a PTR record linking the IP back to the hostname. The hostname is typically found in the HELO or Received headers, but its presence isn't guaranteed. Online tools can also assist in confirming correct setup.

Key opinions

  • FCrDNS Verification: The fundamental check is verifying Forward Confirmed reverse DNS (FCrDNS), ensuring that forward and reverse DNS records match.
  • Smarthost Configuration: Each smarthost requires its own hostname, with an A record pointing to the IP address and a PTR record linking the IP back to the hostname.
  • Hostname Location: The hostname is typically found in HELO or Received headers, although this is not always guaranteed.

Key considerations

  • Hostname Matching: Start with the hostname, resolve it to an IP address, then resolve the IP address back to a hostname. If the resulting hostname matches the original, the setup is correct.
  • Comprehensive Setup: Ensure that for each smarthost, both A and PTR records are correctly configured.
  • Header Reliability: While HELO and Received headers often contain the hostname, relying solely on them for verification is unreliable.
Expert view

Expert from Email Geeks shares that every smarthost you have needs to have its own hostname, and you need to set up an A record from that hostname to the smarthosts IP address, and a PTR record from that IP address to the hostname.

August 2024 - Email Geeks
Expert view

Expert from Word to the Wise explains that the core of checking is verifying that forward and reverse DNS match. This is known as Forward Confirmed reverse DNS, or FCrDNS. You can use online tools to help confirm this is setup correctly.

September 2024 - Word to the Wise
Expert view

Expert from Email Geeks explains the only place you’ll _typically_ see the actual hostname of the server is in the HELO (often recorded in a Received header) and where an intermediate server does that reverse DNS lookup for you and records that in a Received header. Neither of those are 100% guaranteed to be there.

December 2023 - Email Geeks
Expert view

Expert from Email Geeks explains to start with the hostname, look it up to get an IP address, then look up the IP address to get a hostname. If it matches where you started, you’re good.

August 2023 - Email Geeks

What the documentation says
5Technical articles

To check if a sending IP address matches the hostname in the PTR record, various documentation sources recommend using online tools (e.g., IntoDNS, MXToolbox) and command-line utilities. The `dig` command (e.g., `dig -x your_ip_address`) can be used to retrieve the hostname associated with an IP. A properly configured PTR record should match the A record, verified by resolving the IP to a hostname and then resolving the hostname back to an IP address, ensuring the IPs match. For Windows servers, `nslookup <IP_address>` queries the PTR record and displays the hostname if configured correctly. It is essential to check PTR record propagation when created or modified, confirming the IP resolves to the correct hostname.

Key findings

  • Online Tools: Online tools like IntoDNS and MXToolbox can be used to check PTR record setup.
  • dig Command: The `dig -x` command can be used to verify the hostname associated with an IP address.
  • RFC Conformance: A properly configured PTR record should match the corresponding A record.
  • nslookup Command: On Windows, `nslookup <IP_address>` can be used to query the PTR record.

Key considerations

  • Reverse DNS Lookup: Resolve the IP address to a hostname using reverse DNS.
  • Forward DNS Lookup: Resolve the hostname back to an IP address using forward DNS.
  • IP Matching: Ensure the original IP address and the IP address obtained from the forward DNS lookup match.
  • PTR Propagation: Check PTR record propagation when creating or modifying records to ensure the IP resolves to the correct hostname.
Technical article

Documentation from RFC Editor specifies that a properly configured PTR record should match the corresponding A record. To verify, first resolve the IP address to a hostname using reverse DNS. Then, resolve the hostname back to an IP address using forward DNS. The IPs should match.

February 2022 - RFC Editor
Technical article

Documentation from Cloudflare Support explains that when you create or modify a PTR record, you can use online tools to check propagation. Ensure the IP address resolves to the correct hostname.

July 2024 - Cloudflare Support
Technical article

Documentation from Microsoft explains that for Windows servers, you can use the `nslookup` command to query the PTR record. Open Command Prompt and type `nslookup <IP_address>`. The result will show the hostname if the PTR record is correctly configured.

September 2024 - Microsoft Learn
Technical article

Documentation from DigitalOcean Community explains that after setting up a PTR record, you can verify it by using the `dig` command. For example, `dig -x your_ip_address` will return the hostname associated with the IP. Confirm that the hostname is what you expect it to be.

March 2024 - DigitalOcean Community
Technical article

Documentation from Google Workspace Admin Help explains you can use online tools like IntoDNS or MXToolbox to check your PTR record. These tools allow you to enter your IP address and see if the PTR record is correctly set up and pointing to your domain.

June 2023 - Google Workspace Admin Help