Key highlights
- Learn how to flush DNS cache on Windows, macOS, Linux and mobile devices to fix connectivity and website loading issues quickly.
- Identify and troubleshoot common DNS problems like outdated records, slow browsing or DNS propagation delays.
- Use simple commands such as ipconfig /flushdns and sudo killall -HUP mDNSResponder to clear your system’s DNS cache instantly.
- Enhance website reliability by verifying DNS changes and refreshing cached data.
- Resolve DNS errors faster with Bluehost’s DNS management dashboard, propagation checker and 24/7 expert support.
If your favorite website isn’t loading properly or you’re seeing outdated data, it might be time to learn how to flush DNS cache. Ever had a website refuse to load or show the wrong page, even though your internet’s fine?
That’s often your DNS cache playing tricks on you. It saves IP addresses of sites you’ve visited to speed things up – but when those records go bad, your browser gets confused.
Flushing your DNS cache is like hitting “refresh” on your network memory – clearing outdated data so your system fetches the latest info. And the best part? It only takes a few quick commands on Windows, macOS or Linux.
In this guide, we’ll show you step-by-step how to flush DNS cache on different operating systems, including Windows, macOS and Ubuntu. This simple process will help restore your browsing experience for more reliable website access.
What is DNS caching?
DNS caching stores website IP addresses locally so your browser can load sites faster. When you visit a domain, your system saves the DNS lookup results. Instead of contacting the DNS server again, it retrieves the info from the local DNS cache.
However, over time, this cache can store outdated or incorrect data. That’s when you need to flush DNS cache – it clears old records and forces your system to fetch new ones. This helps fix issues like pages not loading, slow connections or redirected websites.
In short, DNS caching improves speed, but clearing it restores accuracy and prevents errors.
Why should you flush your DNS cache?
Flushing your DNS cache can fix several common issues. Here are a few reasons why you might need to clear it:
- Resolve connectivity issues: Sometimes, outdated DNS records can prevent websites from loading properly. Flushing the DNS cache forces your system to retrieve the most current DNS information.
- Fix incorrect DNS information: If you recently changed your DNS records (for example, moved to a new hosting provider), the cached data may still point to the old server. Flushing the cache ensures your system uses the correct IP address for your domain.
- Improve website loading: By clearing your browser’s DNS cache, your computer won’t rely on stale data. This can speed up your connection and make browsing smoother.
- Resolve DNS propagation issues: After updating DNS settings, it can take time for changes to propagate. Flushing the cache can speed up this process, ensuring your changes are reflected immediately.
In all these cases, flushing the DNS cache is a simple and effective way to restore functionality.
How to check if your DNS cache needs flushing?
Before you flush the DNS cache, it’s good to know if it’s actually causing the issue. Here are some signs your DNS resolver cache might need a refresh:
- Websites aren’t loading properly: If a website won’t load or shows an error like “Page Not Found,” it could be due to incorrect DNS information stored in your cache.
- Changes aren’t visible: Flush your DNS cache if you’ve recently updated records or moved hosts. It forces your browser to fetch the new address instead of the old one.
- Accessing malicious websites: Sometimes, DNS cache can lead you to outdated or malicious sites. Flushing the cache removes the old records, protecting your device from potential threats.
- Slower website load time: When the DNS cache is full, it might slow down your browsing experience.
If you’re experiencing any of these issues, it’s time to flush DNS cache on your system.
How to flush DNS cache on different operating systems?
The steps for flushing the DNS cache depends on the operating system you’re using. Here’s how to do it on Windows, macOS and Linux.
Windows flush DNS cache
- Open Command Prompt: Press the Windows key + R, type cmd and press Enter.
- Run the Command: In the Command Prompt, type the following command:
ipconfig /flushdns
- Press Enter: This will clear the DNS cache on Windows and you’ll see a message confirming the flush was successful.
This command removes old DNS entries and forces your system to look for updated DNS records next time you browse.
Flush DNS cache on Mac
The steps vary slightly based on your macOS version. Here’s how to flush the DNS cache on recent versions of macOS:
- Open terminal: Use Spotlight search (Cmd + Space) and type Terminal.
- Run the command: For most recent macOS versions (Mojave, Catalina and newer), type the following command:
sudo killall -HUP mDNSResponder
- Enter administrator password: Type your password and press Enter. This will clear your DNS cache on Mac.
- For older versions: If you’re using MacOS Leopard or Mountain Lion, use the following command:
sudo discoveryutil mdnsflushcache
Linux flush DNS cache
On Linux, you’ll typically use the Terminal to flush the DNS resolver cache. Here’s how to do it:
- Open terminal: Press Ctrl + Alt + T or search for Terminal in your applications.
- Run the command:
- For Ubuntu and Debian-based systems, use:
sudo systemd-resolve --flush-caches
- On older systems or if you use dnsmasq or nscd, the command might be:
sudo service dnsmasq restart
With DNS and browser caches sorted on your computer, let’s finish the job on mobile devices. Here’s how to clear DND cache on iOS and Android.
How to flush DNS cache on mobile devices?
Flushing the DNS cache on mobile devices is slightly different from desktop operating systems but just as simple. Here’s how to do it on Android and iOS.
How to clear DNS cache on Android?
- Clear cache through browser:
- Open your browser (for example, Google Chrome).
- Go to the Settings menu, then clear browser history and cache.
This will also clear the browser’s DNS cache.
2. Clear cache via Wi-Fi settings:
- Open Settings and go to Network & Internet.
- Select Wi-Fi, then click on the network you’re connected to.
- Tap Forget Network and reconnect. This action clears the DNS cache for your current network.
- Use airplane mode:
- Switch your phone to Airplane mode and then back to normal mode. This resets your network connection and can help flush any DNS cache stored on your mobile device.
How to clear DNS cache on iPhone (iOS)?
- Use airplane mode:
- Swipe up (or down on newer iPhones) to open the Control Center and enable Airplane Mode.
- Wait a few seconds, then disable it. This will reset your DNS cache.
- Reset network settings:
- Go to Settings > General > Reset > Reset Network Settings.
- This will clear all network-related caches, including the DNS resolver cache.
- Flush cache through browser:
- For Safari, go to Settings > Safari and tap Clear History and Website Data. This clears the browser’s DNS cache.
Let’s find out other quick ways to force refresh DNS lookups – without doing a local flush.
Alternative ways to refresh DNS cache
If you’re still facing DNS-related issues after flushing your DNS cache, there are several alternative methods you can try. These methods can help resolve persistent problems like slow browsing, outdated data or DNS propagation delays.
1. Restart your router
Your router stores DNS cache too. If you’re facing issues with multiple devices, restarting your router can clear the router’s DNS cache. Simply turn off the router, wait for about 30 seconds and turn it back on. This resets any cached DNS records stored in the router.
2. Flush DNS through DNS resolver tools
If you use third-party DNS providers like Google DNS or Cloudflare, you can flush DNS through their tools. For example:
- Google DNS: Use the following command in the Command Prompt:
ipconfig /flushdns
- Cloudflare DNS: Use their DNS diagnostic tool to ensure the correct DNS records are being resolved.
3. Clear browser cache and cookies
Sometimes, your browser’s cache can cause DNS issues. Clearing your browser’s DNS cache can resolve these problems. Follow these steps in popular browsers:
- Chrome: Go to Settings > Privacy and Security > Clear Browsing Data. Select Cached images and files.
- Firefox: Go to Settings > Privacy & Security and clear Cached Web Content.
- Safari: Go to Preferences > Privacy > Manage Website Data and clear the cache.
4. Switch DNS providers
If your DNS provider isn’t resolving websites quickly or accurately, consider switching to a faster or more reliable DNS provider like Google DNS or Cloudflare DNS. You can change your DNS settings in your router or operating system:
- Google DNS: Set DNS servers to 8.8.8.8 and 8.8.4.4.
- Cloudflare DNS: Set DNS servers to 1.1.1.1 and 1.0.0.1.
5. Flush DNS cache using browser developer tools
For users who frequently face DNS issues with certain websites, using the Developer tools in browsers like Google Chrome can help. In Chrome, for example:
- Press Ctrl + Shift + I to open Developer Tools.
- Go to the Network tab and check the Disable Cache option.
- Refresh the page to bypass any cached data.
These alternatives can be helpful if a standard DNS flush doesn’t resolve your issues. They allow you to go deeper into your system or network and ensure that the DNS records are up-to-date across all platforms.
Common problems after a DNS flush
As a site owner, even after a local flush, issues can linger due to propagation delays, upstream resolver caching or configuration mismatches. Before we fix things in your hosting DNS and caching tools, here are the most common post-flush symptoms and why they occur.
- Changes not reflecting immediately
After you flush the DNS cache, it may take some time for DNS records to propagate globally. During this period, you may still see old website versions or encounter errors like “404 Not Found.” This is typically due to DNS propagation delays, which can last from a few minutes to 48 hours.
- Incorrect DNS information
If you’ve recently updated your DNS records (for example, changed the IP address or switched hosting providers), you might still see the previous website version after a flush. This happens if your ISP or DNS resolver caches the old records.
- “DNS cache not cleared” errors
Sometimes, despite running the flush DNS command, the cache may not clear due to permissions issues or errors in the command prompt. This can occur if you’re not running the command as an administrator or if your operating system doesn’t fully reset the cache.
- Slow website loading
Flushing the DNS cache can lead to slower load times temporarily as the system re-fetches data from the DNS server. However, this should improve once the cache is rebuilt with fresh, correct data.
Now that you’ve cleared local caches, let’s fix what’s left inside your Bluehost setup – records, SSL, and caching.
Troubleshooting DNS flush issues with Bluehost
You’ve flushed your cache, but your site still isn’t behaving as expected. As the site owner, the next step is to verify your records, caching and SSL inside your hosting setup.
If you host with us at Bluehost, our platform helps you run the following checks easily:
- Confirm nameservers
- Review zone records in DNS Manager
- Purge CDN and site caches
- Reissue SSL if the host/IP changed
These checks align your domain, DNS and HTTPS so visitors hit the right server – fast and reliably.
How does Bluehost help you resolve DNS issues?
At Bluehost, we provide several tools and support options to help you resolve DNS-related issues quickly:
- DNS management in the control panel
Bluehost users have access to a powerful DNS management dashboard. Here, you can easily manage DNS records, set TTL values and verify that your DNS changes are correct. This ensures that your website is always resolving correctly, especially after a DNS flush.
- 24/7 Customer support
If you’re having trouble with DNS changes not reflecting after a flush, our expert support team is available 24/7. Whether it’s DNS propagation issues or more complex problems, our support team will guide you through troubleshooting and resolution steps, ensuring your website is back online.
- DNS propagation monitoring
We provide DNS propagation checker tools to verify if your DNS changes have propagated across different regions. This tool helps you ensure that all DNS resolvers are using the updated information and that your visitors are accessing the correct website.
- Integrated SSL and SPF/DKIM management
For users experiencing issues with secure connections (SSL) or email deliverability (SPF/DKIM), Bluehost’s integrated tools make it easy to configure and troubleshoot these settings after flushing the DNS cache.
Also read: How to Manage DNS in Bluehost Cloud Hosting
Advanced solutions for Bluehost users
If you’re a Bluehost user with more advanced needs, here are some solutions to consider:
- Automated DNS updates with API
For those using VPS or Dedicated Hosting, you can automate DNS updates and cache refreshes via API integration. This allows you to quickly propagate DNS changes without needing to manually flush the cache each time.
- Custom DNS settings
If your website uses custom DNS records (for example, for load balancing or geo-targeting), Bluehost’s advanced DNS settings let you configure complex records, manage multiple name servers and fine-tune propagation times. This is ideal for users who manage larger, more complex websites.
- Advanced DNS caching solutions
If you’re using Cloudflare or another CDN, Bluehost seamlessly integrates with these services to further optimize DNS cache management. By combining these tools with your Bluehost Hosting plans, you can manage DNS caching across multiple layers of your network.
- Server-side DNS caching for advanced users
For those who want more control over their server’s DNS resolver cache, Bluehost offers VPS and Dedicated hosting users the option to manage their own DNS resolver settings. This allows you to clear cache, configure time-to-live (TTL) and force DNS queries to go directly to the DNS server for fresh data, without waiting for propagation.
By leveraging these advanced solutions, Bluehost users can gain complete control over DNS resolution and ensure their websites are always running with the most up-to-date information.
Final thoughts
Flushing your DNS cache is an essential step in resolving website loading issues and ensuring you have the most up-to-date DNS records. No matter if you’re on Windows, macOS or Linux, clearing your DNS cache can quickly fix connectivity problems.
If issues persist, we at Bluehost provide DNS management tools, expert support and seamless integrations to keep your site running smoothly. Don’t let DNS problems slow you down – flush your DNS cache today and trust Bluehost to provide the reliable hosting you need.
Need help? Contact Bluehost’s support team for assistance.
FAQs
Yes, it’s completely safe to flush DNS cache. It doesn’t delete personal data – it only clears stored DNS records, forcing your device to fetch fresh IP addresses for websites.
You should flush DNS cache whenever websites fail to load, after changing your DNS server or when you notice incorrect or outdated data. Regularly clearing it can help maintain smooth connectivity and security.
Indirectly, yes. Clearing the DNS resolver cache removes broken or outdated entries, which can improve response times and ensure quicker DNS lookups for websites.
No. Flushing DNS cache doesn’t affect browser cookies or login sessions. It only resets the stored domain name to IP address mappings.
A DNS cache stores website address lookups, while a browser cache stores website files like images and scripts. Both can be cleared to fix connectivity issues or loading problems.
Yes, advanced users can schedule automatic DNS flushes using scripts in the system’s command line interface or through hosting platforms. Bluehost offers built-in tools to manage DNS records efficiently.

Write A Comment