A Complete Guide to Clearing DNS Cache and Configuring Reverse DNS in WHM

This article explains how DNS caching works, why clearing your DNS cache may be necessary, and how to clear it on Windows, macOS, ChromeOS, Ubuntu, and other Linux systems. It also provides a complete step-by-step guide to configuring Reverse DNS (PTR records) in WHM, including system requirements, creating reverse DNS zones, editing PTR records, and testing your configuration.

DNS cache, flush DNSreverse DNS WHMPTR records, cPanel DNS

~3 min read • Updated Feb 18, 2026

1. Understanding DNS Cache


Your DNS cache stores IP addresses of websites you recently visited. If a website changes its IP address, your system may still use the old cached IP, causing errors such as repeated 404 pages.


Although DNS cache updates automatically, you may need to clear it manually when encountering DNS-related issues.


2. How to Clear DNS Cache


2.1 Windows®

  1. Open Start.
  2. Search for cmd.
  3. Right-click Command Prompt → Run as Administrator.
  4. Run:
ipconfig /flushdns

Success message:

Windows IP configuration successfully flushed the DNS Resolver Cache.

2.2 macOS® (10.10.4+)

Requires administrator password.

sudo killall -HUP mDNSResponder

No output means success.


2.3 ChromeOS

chrome://net-internals

Select DNS → Clear host cache.


2.4 Ubuntu®

sudo resolvectl flush-caches

2.5 Non-Ubuntu Linux®

systemctl restart nscd

3. Editing the /etc/hosts File


Some development tools (like MAMP) override DNS. You may need to manually remove outdated entries.


Example:

10.0.0.0 localhost
192.0.2.0 example.com
8.8.8.8 google.com

Delete outdated lines → Save → Clear DNS cache again.




4. Understanding Reverse DNS (PTR Records)


Reverse DNS maps IP addresses to domain names using PTR records. It is essential for:

  • Email deliverability
  • Firewall identification
  • Security validation

Most users cannot edit PTR records directly; hosting providers must delegate authority.


5. System Requirements


PTR records require authoritative DNS nameservers. To find them, run:

dig +nssearch 0.168.192.in-addr.arpa

Note: WHM does not support IPv6 reverse DNS in this interface.




6. Adding a Reverse DNS Zone in WHM


Navigate to:

WHM » Home » DNS Functions » Add a DNS Zone

Enter:

  • Your server’s IP address
  • The reverse DNS zone name

How to construct a reverse DNS zone name:

  1. Remove the last octet of the IP.
  2. Reverse the remaining octets.
  3. Add .in-addr.arpa.

Example:

IP: 192.168.0.1
Reverse zone: 0.168.192.in-addr.arpa

If your provider delegates a byte boundary > 25, use a dash:

128-24.0.168.192.in-addr.arpa



7. Adding PTR Records in WHM


Go to:

WHM » Home » DNS Functions » DNS Zone Manager

  1. Click Manage next to the reverse zone.
  2. Click Add Record.
  3. Select PTR.
  4. Enter the reverse zone name in the Name field.
  5. Enter the final octet (or delegated range) in the Record field.
  6. Click Add Record.



8. Testing Your Reverse DNS


After propagation, run:

host 192.168.0.1

Expected output:

1.0.168.192.in-addr.arpa domain name pointer www.example.com.

Conclusion


Clearing DNS cache ensures your system uses fresh DNS data, while configuring Reverse DNS improves email deliverability and server trust. Together, these practices help maintain a stable and secure hosting environment.


Written & researched by Dr. Shahin Siami