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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue