How to Flush DNS Cache | Windows Linux Mac OS X | Firefox Chrome (2024)

Use the following guide to flush or clear the DNS cache on your computer.

Contents hide

1Quick Steps:

2Windows

4Mac

5Google Chrome

6Firefox Web Browser

7Our Guiding Principles

Quick Steps:

  • Open a command prompt or terminal window.
  • On Windows typeipconfig /flushdns.
  • In Linux, see options below depending on your distribution.
  • On Mac typedscacheutil -flushcache.
  • You can also simply reboot your computer to flush DNS cache instead of running any of the above commands.

It may be necessary to flush or clear your DNS cache on your local computer when making DNS changes, especially when migrating your websites. This is a fairly simply task to complete. In most cases, rebooting your computer will also have a similar effect.

Note: When making DNS changes such as changing nameservers, it may be necessary to clear the DNS cache on your computer. By default, all computers store a cached version of DNS entries to make loading a website faster as opposed to having to look up the DNS record on each load. When you change your nameservers or modify DNS records, this can sometimes cause issues since your computer may not yet reflect the change.

Windows

Open up Command Prompt from your Windows installation. In WIndows 10, simply tap the Search button on the taskbar, type cmd in the search box and choose Command Prompt on the top. In Windows 7 and Windows Vista, enter cmd in the search box at the bottom of the Start Menu and then click Command Prompt when it appears in the results. For XP, go to Start > Run > type cmd in the run box & press Enter.

Once you’ve opened the Command Prompt, type the command below and then press Enter.

ipconfig /flushdns

This will clear the local DNS cache on the computer, refer to the image below.

Flushing DNS cache in Windows.

Linux

Open terminal, run one of the corresponding commands below depending on the packages on your system:

Flush NSCD DNS Cache

sudo /etc/init.d/nscd restartORservice nscd reload

Flush BIND Server DNS Cache

/etc/init.d/named restartORrndc restart

Flush DNSMASQ DNS Cache

/etc/init.d/dnsmasq restart OR service dnsmasq restart

Mac

Mac has different utilities for each of its versions. To clear the DNS cache, launch a terminal (Applications > Utilities > Terminal) and run the commands below based on the version you have.

MacOS VersionsCommands
MacOS 10.10.4 and abovesudo killall -HUP mDNSResponder
MacOS 10.10.1, 10.10.2, and 10.10.3sudo discoveryutil mdnsflushcache
MacOS 10.7, 10.8, and 10.9sudo killall -HUP mDNSResponder
MacOS 10.5 and 10.6sudo dscacheutil -flushcache

Even after flushing the DNS cache in an operating system level on a computer, the web browsers may also hold internal DNS caches. For this reason, the domains may still resolve to old IP addresses some times. Let us have a look at how to clear those DNS caches on different Web browsers.

Google Chrome

Due to Google Chrome’s internal DNS cache system, the domains may still point to old IPs even after clearing DNS cache on the operating system. You can follow the following steps in order to clear the same from your side.

Open a new tab in your Chrome browser and type the address chrome://net-internals/#dns which should get you to a page something like following.

Click on “Clear host cache”

That’s it.

Firefox Web Browser

In the Firefox web browser the process is almost similar to Google chrome. Here we will need to alter two variables called network.dnsCacheExpiration and network.dnsCacheExpirationGracePeriod. You can follow the following steps to do the same from your browser.

Open a new tab In the Firefox browser and enter the address about:config. This will get you to a page like the following.

Click on “I accept the risk!” and you will see the list of variables in Firefox as follows.

On the search bar on that page, search for “network.dnsCacheExpiration”

It should return with two results namely, network.dnsCacheExpiration and network.dnsCacheExpirationGracePeriod with the values set as 60. We will need to double click on that value and change it to 0.

Now, double-click on the value part where it says 60, and set it to 0.

Once done for both the values, reset those to 60 again.

The value we just have changed stores the TTL (Time To Live or expiration time for DNS records). By changing it to 0 makes it immediately clear out the DNS cache. Once done we reset it back to its default value.

Note: If you are unable to find these values in your browser you will have to manually create those values with 60 and follow the above steps and you are good to go.

Conclusion

Great! You’ve successfully purged the DNS cache on your machine. One thing to note is that DNS changes can take up to 48 hours to fully propagate throughout the internet’s DNS servers. You would need to wait a few hours for these changes to take effect.

If you have any web hosting questions please feel free to reach out to us.We're happy to help.

Shared Hosting | Reseller Hosting | Managed WordPress Hosting | Fully Managed VPS Hosting

Our Guiding Principles

  • Provide consistent, stable, and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high-quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.
How to Flush DNS Cache | Windows Linux Mac OS X | Firefox Chrome (2024)
Top Articles
How to fix ‘Safari can’t establish a secure connection’
Overdraft Fees: Everything You Need to Know
Craigslist Livingston Montana
55Th And Kedzie Elite Staffing
Bj 사슴이 분수
Craigslist Cars And Trucks For Sale By Owner Indianapolis
Math Playground Protractor
Botanist Workbench Rs3
Hertz Car Rental Partnership | Uber
Nordstrom Rack Glendale Photos
Paula Deen Italian Cream Cake
Lichtsignale | Spur H0 | Sortiment | Viessmann Modelltechnik GmbH
Swimgs Yung Wong Travels Sophie Koch Hits 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Springs Cow Dog Pig Hollywood Studios Beach House Flying Fun Hot Air Balloons, Riding Lessons And Bikes Pack Both Up Away The Alpha Baa Baa Twinkle
Kagtwt
Www.paystubportal.com/7-11 Login
Jscc Jweb
Voyeuragency
Nioh 2: Divine Gear [Hands-on Experience]
Job Shop Hearthside Schedule
Springfield Mo Craiglist
Walmart Double Point Days 2022
Enterprise Car Sales Jacksonville Used Cars
Violent Night Showtimes Near Century 14 Vallejo
Dulce
Atlases, Cartography, Asia (Collection Dr. Dupuis), Arch…
3 2Nd Ave
Haunted Mansion Showtimes Near Epic Theatres Of West Volusia
3Movierulz
City Of Durham Recycling Schedule
Ullu Coupon Code
Jamielizzz Leaked
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Aid Office On 59Th Ashland
Phone number detective
Craigslist Greencastle
Puffco Peak 3 Red Flashes
Google Chrome-webbrowser
Www Craigslist Com Brooklyn
Tryst Houston Tx
Union Corners Obgyn
Aita For Announcing My Pregnancy At My Sil Wedding
511Pa
Emily Browning Fansite
Saline Inmate Roster
Coffee County Tag Office Douglas Ga
Dying Light Mother's Day Roof
Haunted Mansion Showtimes Near Millstone 14
Mlb Hitting Streak Record Holder Crossword Clue
Freightliner Cascadia Clutch Replacement Cost
Wvu Workday
Publix Store 840
Denys Davydov - Wikitia
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6565

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.