DNS, or Domain Name System, is the technology that translates website addresses into the numbers computers use to find them on the internet. When you type "www.example.com" into your browser, DNS servers convert that name into an IP address like "192.0.2.1" so your computer knows where to send the request. This translation happens thousands of times every day across the internet.
Get Your Free TV HDMI Connection Setup Guide →
Your computer stores copies of these translations in something called a DNS cache. Think of it like a notebook where your device writes down answers to questions it has already asked. The first time your computer looks up a website address, it asks a DNS server for help. The server provides the answer, and your computer saves that answer in its cache. The next time you visit that same website, your computer checks its notebook first. If the answer is there and still fresh, it uses the cached information instead of asking the DNS server again.
This caching system saves time and reduces network traffic. A website address lookup that normally takes a fraction of a second happens even faster when the answer comes from your local cache. With millions of computers doing this throughout the day, DNS caching reduces the overall load on internet infrastructure. However, cached information has an expiration date, called a Time To Live (TTL). When this time expires, the cached entry becomes invalid, and your computer must ask the DNS server for a fresh answer.
Problems occur when cached information becomes outdated or incorrect. This might happen if a website owner changes which server hosts their website. The old cached address in your computer still points to the previous location, so you might see error pages or fail to reach the site. DNS cache issues can also cause email delivery problems, security concerns when malicious cached entries exist, or problems accessing services after they move to new servers.
Practical Takeaway: DNS caching is a normal, helpful process that speeds up internet browsing. Understanding what it does and why it matters prepares you to recognize when clearing your cache might solve connection problems.
Several situations suggest that refreshing your DNS cache could resolve issues. One of the most common signs is visiting a website that previously worked but now shows an error message like "Cannot reach server" or "DNS_PROBE_FINISHED_NXDOMAIN." If you know the website is actually online (you might check by using your phone's internet connection or asking someone else), the problem likely involves your computer's cached DNS information pointing to an old address.
How to Replace a Miele Vacuum Bag →
Email problems can also indicate DNS cache issues. If you suddenly cannot send or receive email but your email account works fine on your phone, your computer's cached DNS information for your email server might be outdated. Some email providers change their server addresses periodically, and your cache might not yet know about the change. This shows up as "Cannot connect to mail server" errors even though nothing changed in your email settings.
Website changes and migrations commonly cause situations where DNS cache refresh helps. When a business moves its website to a new hosting provider, the website owner changes the DNS records pointing to the new location. Your computer might still have the old address cached, so you see the previous website or an error page. This can persist for hours or days until your cache naturally expires, which is why manual clearing helps.
Security concerns may also warrant a cache refresh. In rare cases, malicious cached DNS entries might exist on your computer. This could happen if your computer was infected with malware that modified DNS settings. Refreshing your cache removes these potentially harmful entries. Additionally, after visiting a suspicious website or if you suspect your computer has security issues, clearing DNS cache is one step in troubleshooting.
Network problems and connection issues sometimes relate to DNS cache. If you recently changed internet providers, routers, or networks (like connecting to a different WiFi), your cached DNS information might conflict with the new network's settings. Refreshing the cache forces your computer to obtain fresh DNS information appropriate for your current network.
Practical Takeaway: Keep these common symptoms in mind: websites that worked before now show errors, email won't connect, or services appear offline after a known migration. These situations often improve after a DNS cache refresh.
Refreshing DNS cache on Windows computers involves using the Command Prompt, a text-based interface for giving your computer direct instructions. Begin by opening the Command Prompt. On Windows 10 and 11, click the Windows Start button, then type "cmd" or "command prompt" in the search box. Click on "Command Prompt" when it appears in the results. For Windows 7, click Start, go to Accessories, and find Command Prompt in the list.
How to Feel Better With Car Sickness →
Once Command Prompt is open, you should see a black window with white text and a blinking cursor. The window likely shows something like "C:\Users\YourName>" or similar. Here is where you type the command to refresh your DNS cache. Type this exact command: ipconfig /flushdns
After typing the command, press Enter on your keyboard. Your computer will process this instruction. If successful, you should see a message that says "Successfully flushed the DNS Resolver Cache" in green text. This confirms that your cached DNS information has been cleared. If you see a message about administrator rights, close this Command Prompt window and try again. Right-click on Command Prompt and select "Run as administrator," then enter the same command.
After successfully flushing your DNS cache, close the Command Prompt window and restart your web browser. Try visiting the website that was causing problems. Your browser should now request fresh DNS information rather than using old cached entries. In many cases, the website loads correctly at this point. If problems continue, the issue may involve something other than DNS cache.
Some Windows users prefer a graphical method that avoids the command line. You can go to Settings, then Network & Internet, then Advanced network settings. Look for an option related to DNS or network settings. However, the Command Prompt method is faster and more direct. The ipconfig /flushdns command is the standard approach that computer technicians use.
Practical Takeaway: Write down the command "ipconfig /flushdns" or bookmark this section so you have it readily available. Most DNS cache problems on Windows clear within seconds using this single command in administrator Command Prompt.
Refreshing DNS cache on Mac computers requires access to the Terminal application, which is similar to Command Prompt on Windows. Unlike Windows, the process varies depending on which version of macOS your computer runs. Check your macOS version before starting: click the Apple menu in the top-left corner and select "About This Mac." The version number appears in the window that opens.
Get Your Free Puppy Chow Recipe Guide →
To open Terminal, click the Spotlight search icon (magnifying glass) in the top-right corner of your screen, type "terminal," and press Enter. A black window with white text opens, showing a prompt with your computer name and username. This is where you enter the command to flush your DNS cache. For most modern Mac computers running macOS 10.13 or newer, enter this command: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Press Enter after typing the command. Your computer may ask you to enter your password—the same password you use to log into your Mac. Type your password and press Enter. Note that the password does not display as you type, which is normal for security purposes. After entering your password correctly, your DNS cache clears. You might see some text briefly appear in Terminal, or the window might clear without obvious confirmation. This is normal.
For older Mac computers running macOS 10.12 or earlier, the command is slightly different: sudo dscacheutil -flushcache. After flushing your cache on any Mac, close Terminal and restart your web browser. Try visiting the website that previously showed errors. The site should now load using fresh DNS information.
Mac users with technical experience might prefer using Homebrew or other tools, but the Terminal method described here is the standard approach recommended by Apple support. If you see error messages mentioning "command not found," check that you typed the command exactly as shown, including all punctuation and spacing. Even a single space in the wrong place prevents the command from working.
Practical Takeaway: Check your macOS version first, then use the appropriate command for your version. The process takes about 30 seconds, and restarting your browser afterward allows fresh DNS lookups to occur.
This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.