Flush DNS - How and why to clear your DNS cache (2024)

  1. What's My DNS?
  2. Flush DNS - How and why to clear your DNS cache

If you are having trouble accessing a web page or using an online service, it may be that your device has cached an out-of-date DNS record which needs to be manually cleared or reset. This is a process known as flushing your DNS cache and is easy to do, but the steps you need to take will depend on what device you are using.

How to flush your DNS cache

If you are familiar with using your systems command line or terminal, then the commands to flush your DNS for the most popular operating systems are listed below.

If you're unsure of how to use these commands, more detailed instructions including screenshots of each step can be found in the dedicated section for each version.

Microsoft Windows

The following command will work on Windows 7, 8, 10 + Windows Server, but opening the command prompt is slightly different for each version.

  1. Right click on the start menu and choose Command Prompt (Admin) from the menu.
  2. Type in the command ipconfig /flushdns.

Flush DNS - How and why to clear your DNS cache (1) Flush DNS - How and why to clear your DNS cache (2) Flush DNS - How and why to clear your DNS cache (3) Flush DNS - How and why to clear your DNS cache (4) Flush DNS - How and why to clear your DNS cache (5) Flush DNS - How and why to clear your DNS cache (6)

→ view instructions and screenshots for all versions of Windows

Apple MacOS and Mac OS X

From the Mac Terminal app, you need to run the following command depending on your version:

MacOS 11 & 12 (Big Sur, Monterey)

MacOS 10.12 - 10.15 (Sierra, High Sierra, Mojave, Catalina)

Mac OS X 10.7 - 10.9 & 10.11 (Lion, Mountain Lion, Mavericks, El Capitan)

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Flush DNS - How and why to clear your DNS cache (7) Flush DNS - How and why to clear your DNS cache (8) Flush DNS - How and why to clear your DNS cache (9) Flush DNS - How and why to clear your DNS cache (10) Flush DNS - How and why to clear your DNS cache (11) Flush DNS - How and why to clear your DNS cache (12)

Mac OS X 10.10 (Yosemite)

sudo discoveryutil mdnsflushcache

Mac OS X 10.6 (Snow Leopard)

sudo dscacheutil -flushcache

Mac OS X 10.5 (Leopard) and below

sudo lookupd -flushcache

Linux

From the terminal or SSH session run the following:

systemd - Ubuntu & Debian

systemd-resolve --flush-caches

NSCD

sudo /etc/init.d/nscd restart

→ view full instructions for Linux

Why do you need to flush DNS cache?

DNS records are stored locally in a cache on your computer, phone, tablet, or even smart TV. These devices will automatically cache IP addresses and other DNS records when they perform a DNS lookup request the first time you visit or use them.

DNS results are cached in order to speed up subsequent requests to the same website or service without needing to perform an additional DNS lookup. Sometimes old results will be cached for a long period of time and your device will continue to try communicating with the IP address of the old result even though they may have since been changed, this can often result in you not being able to access a website, game server, or other online service as you would expect.

The amount of time that a result is cached on your local device is known as the TTL (Time-to-Live). Your device will not attempt to check for an updated record from the DNS server if this time has not yet expired. The TTL of DNS records are configured by the domain administrator and can be anywhere from a few minutes up to 3 days or even longer in some cases. For this reason, issues may arise if DNS changes to domain names DNS configuration have been made and your system has a cached result which is not yet due for renewal. If this occurs, then the cache needs to be cleared for your system to know how to communicate with the new server.

How do you know if you need to flush your DNS cache?

There are a few signs that may indicate that you need to flush your DNS, some of these include:

DNS records don't match: You can easily check DNS propagation globally for any domain name, and if your local system is not returning the same results then this may indicate that you need to flush your DNS.

If you are a website owner and you have recently made changes to your domain, name servers, or DNS hosting providers settings and are having troubles accessing your own website, then it is likely that you will run into DNS caching issues, and you need to flush your DNS cache.

Unable to access websites: If you are unable to access a website, which you normally have no problems with then this may indicate a DNS cache issue.

Page not found errors: If you are getting a 404 page not found error, then it may mean that the page has simply been deleted. If, however you know that the page does exist, as it is your own website then this may mean that you are connecting to an old server which does not have the page you are after. This is often the problem when you have changed domain or hosting providers.

Seeing old versions of a website: If changes have been made to the DNS configuration of a website, you may not be connecting to the new version. If this is the case, flushing your DNS may help resolve the issue.

As you can see, there are a variety of reasons for needing to clear your DNS cache, so it is worth clearing your DNS cache to eliminate it as a possible point of failure.

What happens when you flush the DNS cache?

When you clear your DNS cache, your device will purge all local DNS records which have been previously resolved and cached regardless of the TTL set on the record. This means that when you access a website or service the next time, a new DNS lookup will need to be performed to get this information and it will be once again cached for future requests.

Is it safe to flush DNS cache?

Yes, it is safe to flush your DNS. Some people worry about clearing or resetting their DNS cache, or if doing it too often will cause some sort of damage. This may be due to some operating systems asking for administrator permission or elevated privileges in order to do so. However, you do not need be worried as it is perfectly okay and will not cause any damage to your system or device.

It should be noted that when you do flush your DNS cache, that the first time you access a website or service again after having done so will mean that a full DNS lookup will need to be performed, which will add a slight delay to the connection and may for example make a page appear to load more slowly. This is typically a very small delay, and most people would not be able to notice.

Can flushing DNS improve network performance and speed up the internet?

Typically flushing your DNS cache does not speed up your internet connection itself, however it is possible that doing so may make certain sites or services faster.

If service providers have moved their hosting infrastructure to more performant servers or network and you have a cached DNS record still pointing to an old server, then by flushing your DNS cache you will be able to start accessing the new server or network without having to wait for the records to expire naturally.

Some service providers use DNS servers which return multiple results for fault tolerance, routing and performance reasons. These results can depend on where you are located, and in certain circ*mstances you may receive results incorrectly or when maintenance was happening in a certain region, and you are assigned to a region which is not optimal. When this happens, at least getting slower access is better than no access. If this is the case, then flushing your DNS cache could have you connecting to a closer server resulting in faster access and improved performance.

Flushing DNS on Microsoft Windows

Flushing the DNS cache on Windows is easy to do but depending on which version of Windows you are running the steps will vary slightly.

Additionally, you will need to make sure that you have administrator permissions in order to flush the DNS cache on Windows as this is a system level command.

Windows 10

Flushing the DNS cache on Windows 10 is a very easy process. Due to system security permissions, you must ensure that you run the command prompt as an administrator user.

  1. Ensure that you're on the Windows 10 desktop.
  2. Right click on the start menu and choose Command Prompt (Admin) from the menu.
  3. Type in the command ipconfig /flushdns

Flush DNS - How and why to clear your DNS cache (13) Flush DNS - How and why to clear your DNS cache (14) Flush DNS - How and why to clear your DNS cache (15) Flush DNS - How and why to clear your DNS cache (16) Flush DNS - How and why to clear your DNS cache (17) Flush DNS - How and why to clear your DNS cache (18)

Some additional commands which can be run from the command prompt to reset your network connection and renew your IP address which can also help resolve issues are:

ipconfig /release - Release your network connections assigned IP address.

ipconfig /renew - Renew your network connection and obtain a new IP address.

Windows 8 / Windows 8.1

Flushing the DNS cache on Windows 8 and Windows 8.1 is a very easy process. Due to system security permissions, you must ensure that you run the command prompt as an administrator user.

  1. Ensure that you're on the Windows 8 Start Screen.
  2. Simply type cmd and the Windows search bar will appear on the right-hand side with search results.
  3. Right click on Command Prompt and click Run as administrator
  4. Type in the command ipconfig /flushdns

Flush DNS - How and why to clear your DNS cache (19) Flush DNS - How and why to clear your DNS cache (20) Flush DNS - How and why to clear your DNS cache (21) Flush DNS - How and why to clear your DNS cache (22) Flush DNS - How and why to clear your DNS cache (23) Flush DNS - How and why to clear your DNS cache (24) Flush DNS - How and why to clear your DNS cache (25)

Windows Vista / Windows 7

Flushing DNS on newer versions of Windows is almost as easy as the earlier versions but due to Microsoft's security additions you must run the command prompt with administrator privileges.

  1. Click the start button and navigate to the command prompt (Start > All Programs > Accessories > Command Prompt)
  2. Make sure that you right click on the command prompt application and choose "Run as Administrator"
  3. Type in the command ipconfig /flushdns

Flush DNS - How and why to clear your DNS cache (26) Flush DNS - How and why to clear your DNS cache (27) Flush DNS - How and why to clear your DNS cache (28) Flush DNS - How and why to clear your DNS cache (29) Flush DNS - How and why to clear your DNS cache (30) Flush DNS - How and why to clear your DNS cache (31) Flush DNS - How and why to clear your DNS cache (32)

Note: It is also possible to type in cmd into the Windows Vista / Windows 7 start menu search field and then right click on the cmd.exe result instead of having to navigate through the various sub menus.

Windows 98/NT/2000/XP

Flushing the DNS on Windows is an easy process, outlined below is the steps that should be run if you wish to clear your DNS cache.

  1. Open the command prompt (Start > Run > cmd.exe > OK).
  2. Type in the command ipconfig /flushdns

Flush DNS - How and why to clear your DNS cache (33) Flush DNS - How and why to clear your DNS cache (34) Flush DNS - How and why to clear your DNS cache (35) Flush DNS - How and why to clear your DNS cache (36) Flush DNS - How and why to clear your DNS cache (37) Flush DNS - How and why to clear your DNS cache (38) Flush DNS - How and why to clear your DNS cache (39)

Flushing DNS on Apple Mac

Flushing the DNS in MacOS and Mac OS X is an easy process, but the steps taken will depend on which version of MacOS you are running.

The first step you need to do is identify which version of MacOS you are running.

  1. Click the Apple icon at the top left of your screen.
  2. Select "About This Mac".
  3. Look at the name and version of MacOS you are running and proceed to the section for your version below.

Note: You will need administrator permissions in order to flush the DNS cache on Mac, this can be done by running the commands as the root user or using sudo before each command.

Flush DNS - How and why to clear your DNS cache (40) Flush DNS - How and why to clear your DNS cache (41) Flush DNS - How and why to clear your DNS cache (42)

macOS 12 - Monterey

If you are running MacOS 12, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

macOS 11 - Big Sur

If you are running MacOS 11, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

macOS 10.15 - Catalina

If you are running MacOS 10.15, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

macOS 10.14 - Mojave

If you are running MacOS 10.14, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

macOS 10.13 - High Sierra

If you are running MacOS 10.13, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

macOS 10.12 - Sierra

If you are running MacOS 10.12, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Mac OS X 10.11 - El Capitan

If you are running Mac OS X 10.11, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Mac OS X 10.10 - Yosemite

If you are running Mac OS X 10.10, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo discoveryutil udnsflushcaches.
  3. Enter your password when prompted.

Mac OS X 10.9 - Mavericks

If you are running Mac OS X 10.9, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Mac OS X 10.8 - Mountain Lion

If you are running Mac OS X 10.8, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Mac OS X 10.7 - Lion

If you are running Mac OS X 10.7, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo killall -HUP mDNSResponder.
  3. Enter your password when prompted.

Mac OS X 10.6 - Snow Leopard

If you are running Mac OS X 10.6, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo dscacheutil -flushcache.
  3. Enter your password when prompted.

Mac OS X 10.5.1 - Leopard and below

If you are running Mac OS X 10.5.1 or below, you need to follow the below steps:

  1. Open Finder and navigate to the Applications > Utilities directory and open the Terminal app.
  2. Type in the command sudo lookupd -flushcache.
  3. Enter your password when prompted.

Other Operating Systems

Flushing DNS on Linux

For Linux systems including Ubuntu, Debian, Red Hat, Fedora, CentOS etc flushing your DNS cache will depend on how your system is configured and which service is responsible for DNS caching.

systemd

If you are running a system that uses systemd like Ubuntu or other Debian based systems, in order to flush your DNS cache then you will need to run the following.

  1. Open a command terminal (either as root or run the following with sudo).
  2. Run the command systemd-resolve --flush-caches
  3. Optional. You can verify that this ran correctly by running the command: systemd-resolve --statistics

NSCD - Name Server Cache Daemon

If you are running the nscd Name Service Cache Daemon and wish to flush your DNS cache, then you will need to do the following.

  1. Open a command terminal (either as root or run step 2 with sudo).
  2. Run the command /etc/init.d/nscd restart

Other ways to flush your DNS cache

Sometimes the standard way of flushing your DNS cache my not be possible, for example if you do not have administrator permissions. Luckily, there are a few other ways to achieve the same result which can often be easier to do.

Restart your device: If you are having issues with any of the other solutions mentioned on this page, then you can try restarting your device. This may not work in all cases but is definitely worth trying.

Reset your network connection: You may try disconnecting and reconnecting a WiFi connection or unplugging and plugging back in an ethernet cable to try and reset your network connection.

Change DNS server: You may consider using one of the popular Global DNS Servers which provide many benefits including speed and security as well as allowing you the ability to ask them to clear their cache.

Hosts file: While making changes to your systems hosts file will not actually flush your DNS cache, it will allow you to force a certain domain name to resolve to a certain IP address. This can be useful as a temporary solution but should not be relied on long term.

How to clear the cache of public DNS resolvers

If you are using a DNS server which allows you to let them know that a record is out of date and needs to be cleared, then they might provide a web interface in order to do so.

Some of the popular providers which all you to do this are listed below:

Cloudflare 1.1.1.1

Cloudflare offers a popular public DNS resolver known as 1.1.1.1 which allows you to clear the DNS cache that they have.

  1. Visit the Cloudflare Purge Cache tool page.
  2. Enter the domain name you wish to clear the cache for.
  3. Choose the record type, this will typically be an A record or a CNAME record.

Google Public DNS 8.8.8.8

Google public DNS resolver also allows you to clear the cache of any domain name in their cache.

  1. Visit the Google Public DNS Flush Cache page.
  2. Enter the domain name you wish to clear the cache for.
  3. Choose the record type, this will typically be an A record or a CNAME record.

OpenDNS

OpenDNS public DNS servers allow you to clear the shared cache of domains that they have cached for all their users.

  1. Visit the OpenDNS CacheCheck page.
  2. Enter the domain name you wish to clear the cache for.
  3. Enter the CAPTCHA code.
  4. Click the "Check this domain" button.
  5. Once the cache has been checked, click the "refresh the cache" button at the bottom of the page.
Flush DNS - How and why to clear your DNS cache (2024)

FAQs

Why should I clear my DNS cache? ›

The problem is that sometimes dangerous IP addresses or corrupted results can be cached and need to be removed. The DNS cache can also impact your ability to connect to the internet or cause other issues.

How do I flush and clear my DNS? ›

Type 'ipconfig /flushdns' in the Command Prompt, and press Enter. 3. The user has now flushed the DNS Cache and will receive a message that they have successfully done so. 4.

How do I flush my DNS DNS checker? ›

To reset the DNS resolver cache, perform the following steps:
  • Click the Start button, then type cmd.
  • Right-click Command Prompt , then choose Run as Administrator .
  • Type ipconfig /flushdns then press Enter . (be sure there is a space before the slash)

Does flushing DNS speed up internet? ›

Once you've successfully flushed the DNS cache, you may initially notice that it's taking a little longer to navigate to the website you regularly browse on your PC. Don't lose patience! You'll experience improved network and Internet speeds soon enough as your DNS cache is populated again with valid information.

What happens if I flush DNS? ›

Flush DNS command removes this stored cache and forces your device to retrieve the information from the DNS again.

Does clearing DNS cache delete passwords? ›

It will not clear anything other than your DNS cache, hence everything else will be where it was (passwords, auto-fill, etc). The purpose of DNS is to resolve hostnames (such as google.com) and convert it to its IP address (172.217. 12.46 in my case). Your cache will simply repopulate itself once you revisit a website.

How often should I flush DNS? ›

It takes 15 minutes for DNS cache to fully clear. While there's no set frequency for DNS cache flushing, we recommend doing it frequently for the best browsing experience.

How do I clear my DNS server problem? ›

  1. Try Using A Different Browser. Strictly speaking, switching to another browser won't fix DNS issues. ...
  2. Check The Site From A Different Device. ...
  3. Restart Your Computer. ...
  4. Restart Your Computer In Safe Mode. ...
  5. Turn Off Antivirus Software And/Or Your Firewall. ...
  6. Turn Off Your VPN. ...
  7. Flush DNS Cache. ...
  8. Restart Your Router.
Dec 15, 2023

What's your DNS? ›

The Domain Name System (known as DNS) is a system used to convert a name (like www.google.com ) into an IP address (like 192.168.2.1 ). These addresses are used by computers to communicate with each other on the internet.

How do I delete all DNS history? ›

If you are using Google Chrome in your Android to play, there is a more thorough method of flushing DNS cache:
  1. Open Chrome.
  2. In the left pane click DNS.
  3. In the right pane click Clear host cache.

How to view DNS cache? ›

Anyways- To display the contents of the DNS resolver cache: Type ipconfig /displaydns and press Enter. Observe the contents of the DNS resolver cache.

How to flush an IP address? ›

To release/renew your IP address, and flush DNS on Windows:
  1. Search box "Commend prompt"
  2. Type "ipconfig /release" and press Enter.
  3. Type "ipconfig /renew" and press Enter.
  4. Type "ipconfig /flushdns" and press Enter.
  5. Restart the computer.
Feb 7, 2022

Does a DNS slow down WIFI? ›

For most consumers, their ISP (Internet service provider) assigns DNS resolvers by default, and if the ISP's DNS servers are performing slowly, this slows down Internet speed for that ISP's users. Users also have the ability to use a DNS resolver other than their ISP's, although many users are unaware of this option.

How to reset DNS settings? ›

To reset your DNS in Windows:
  1. Using the Start Menu at the lower left corner of your screen: ...
  2. Enter CMD into the text box and then select the Command Prompt program.
  3. A new black window will appear. ...
  4. Type ipconfig /flushdns and press ENTER (please note: there is a space between ipconfig and /flushdns)
  5. Restart your computer.

How to force DNS update? ›

You use the ipconfig /registerdns command to manually force an update of the client name registration in DNS.

How often should you flush DNS cache? ›

Records in the cache are kept for their TTL, then re-queried. The TTL was defined in SOA record of specific zone in DNS server. If you need clear DNS cache from client side for every 15 minutes, it is OK. After these caches were cleared, if needed, the client will re-query these records from DNS server.

Is it safe to cache DNS? ›

Attackers can poison a DNS cache by tricking DNS resolvers into caching false information, with the result that the resolver sends the wrong IP address to clients, and users attempting to navigate to a website will be directed to the wrong place.

Should I delete all DNS records? ›

You should remove any invalid DNS records, so if you have A records pointing to a host you are no longer using, remove them. Once your domain is verified, you can safely remove the verification TXT records. You should remove any entries in your SPF that are not needed.

What does turning off DNS caching do? ›

Disabling the JVM DNS cache ensures that DNS is resolved again for every new connection so that the requests are distributed across all of the read replicas. You can do this in your application's initialization code with the following line: java. security.

Top Articles
How to Sell Online: Finding Products for Your Ecommerce Store
FAOLEX
Fat Hog Prices Today
Federal Fusion 308 165 Grain Ballistics Chart
Teenbeautyfitness
The Idol - watch tv show streaming online
Mylife Cvs Login
The Many Faces of the Craigslist Killer
Ucf Event Calendar
Premier Boating Center Conroe
Morocco Forum Tripadvisor
Nebraska Furniture Tables
Uc Santa Cruz Events
Craigslist In Flagstaff
Jet Ski Rental Conneaut Lake Pa
Juicy Deal D-Art
Project, Time & Expense Tracking Software for Business
Reptile Expo Fayetteville Nc
Timeforce Choctaw
Empire Visionworks The Crossings Clifton Park Photos
Touchless Car Wash Schaumburg
Sussyclassroom
Rimworld Prison Break
Ac-15 Gungeon
SN100C, An Australia Trademark of Nihon Superior Co., Ltd.. Application Number: 2480607 :: Trademark Elite Trademarks
When Does Subway Open And Close
Craigslist Pasco Kennewick Richland Washington
Doctors of Optometry - Westchester Mall | Trusted Eye Doctors in White Plains, NY
TMO GRC Fortworth TX | T-Mobile Community
Airg Com Chat
Robert A McDougal: XPP Tutorial
Taktube Irani
Bozjan Platinum Coins
Kstate Qualtrics
Weekly Math Review Q4 3
Tendermeetup Login
Drabcoplex Fishing Lure
Colorado Parks And Wildlife Reissue List
Afspraak inzien
My.lifeway.come/Redeem
Stafford Rotoworld
Fifty Shades Of Gray 123Movies
Cygenoth
Omaha Steaks Lava Cake Microwave Instructions
Barstool Sports Gif
Nami Op.gg
Here's Everything You Need to Know About Baby Ariel
Penny Paws San Antonio Photos
Fatal Accident In Nashville Tn Today
Booknet.com Contract Marriage 2
Star Sessions Snapcamz
Latest Posts
Article information

Author: Sen. Emmett Berge

Last Updated:

Views: 6499

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Sen. Emmett Berge

Birthday: 1993-06-17

Address: 787 Elvis Divide, Port Brice, OH 24507-6802

Phone: +9779049645255

Job: Senior Healthcare Specialist

Hobby: Cycling, Model building, Kitesurfing, Origami, Lapidary, Dance, Basketball

Introduction: My name is Sen. Emmett Berge, I am a funny, vast, charming, courageous, enthusiastic, jolly, famous person who loves writing and wants to share my knowledge and understanding with you.