What deleting DNS actually means and why you might do it
Deleting DNS does not mean erasing the entire system that translates website names into numbers your computer understands. It means clearing the cached DNS records stored on your device — the temporary list of lookups your computer has already done — or resetting your DNS settings back to your internet provider's defaults.
You might do this if a website is loading an old or wrong version, if you switched to a different DNS service (like Cloudflare or Quad9) and want to go back, or if you suspect your DNS has been hijacked to redirect you to malicious sites. Clearing the cache is fast and harmless. Resetting your DNS settings takes a few more steps but is equally safe.
The two operations are different. Clearing the cache solves most loading problems. Resetting your DNS settings is what you do if you changed providers or if you suspect someone has tampered with your configuration.
Key Takeaways
- Clearing your DNS cache (the temporary list of website lookups) takes 30 seconds on Windows or Mac and fixes most website loading problems.
- Resetting DNS settings back to your internet provider's defaults requires going into your network settings or router configuration, depending on whether you want to change one device or your whole network.
- On Windows, the command ipconfig /flushdns run in Command Prompt clears the cache; on Mac, the command varies by operating system version.
- If you changed DNS providers intentionally, you will need to remove the custom DNS addresses from your network settings or router and let your device use your ISP's defaults again.
Clearing DNS cache on Windows
Open Command Prompt as an administrator. Click the Windows Start button, type "cmd" into the search box, right-click "Command Prompt," and select "Run as administrator." A black window will open.
Type the following exactly as shown and press Enter: ipconfig /flushdns. You will see a message that says "Successfully flushed the DNS Resolver Cache." Close the window. Your DNS cache is now empty, and your computer will fetch fresh lookups the next time you visit a website.
This solves most problems where a website shows an old version, loads slowly, or displays an error even though other people can reach it fine. The cache clears automatically over time, but manually flushing it is faster.
Clearing DNS cache on Mac
The command depends on which version of macOS you are running. Open Terminal (find it in Applications > Utilities or search for "Terminal").
For macOS 10.15 and newer, type: sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder and press Enter. You may be asked for your password. For older versions, the command is different — search your macOS version number plus "flush DNS" to find the exact command for your system. After the command runs, close Terminal.
Resetting DNS settings on Windows
If you previously changed your DNS to a third-party service like Cloudflare (1.1.1.1) or Quad9 and want to go back to your internet provider's DNS, you need to remove those custom addresses from your network settings.
Right-click the network icon in your system tray (bottom right corner), select "Open Network & Internet settings," then click "Advanced network options." Scroll down and click "Change adapter options." Right-click your active network connection (usually "Ethernet" or "Wi-Fi") and select "Properties." Find "Internet Protocol Version 4 (TCP/IPv4)" in the list, click it, and click "Properties."
If you see custom DNS addresses entered in the "Preferred DNS server" and "Alternate DNS server" fields, select "Obtain DNS server address automatically" instead. Click OK, then OK again. Your computer will now use your ISP's DNS servers.
Resetting DNS settings on Mac
Click the Apple menu, select "System Settings" (or "System Preferences" on older versions), then click "Network." Select your active connection (Wi-Fi or Ethernet) and click "Advanced." Click the "DNS" tab.
If you see custom DNS addresses in the list, select each one and click the minus button to remove it. Click OK, then click explore. Your Mac will now use your ISP's DNS servers. If the DNS list is empty or grayed out, your Mac is already using automatic DNS.
Resetting DNS on your router
If you changed DNS settings on your router itself (rather than on individual devices), every device on your network uses those settings. To reset them, log into your router's admin panel by opening a web browser and typing your router's IP address — usually 192.168.1.1 or 192.168.0.1 — into the address bar.
Enter your router's username and password (check the sticker on the back of the router if you have not changed them). Look for a section called "DNS," "WAN," or "Internet Settings." If you see custom DNS addresses, delete them or select the option to use your ISP's DNS automatically. Save and reboot the router. All devices on your network will now use your ISP's DNS.
If you do not remember your router's password, you can reset the router to factory defaults by holding the reset button (usually a small recessed button on the back) for 10 to 15 seconds. This erases all your settings, so use this only as a last resort.
When to clear cache versus when to reset settings
Clear your DNS cache if a website is showing an old version, loading slowly, or displaying an error that other people are not seeing. This is the first thing to try and solves most problems in seconds.
Reset your DNS settings if you intentionally switched to a different DNS provider and now want to switch back, or if you suspect your DNS has been hijacked (you are being redirected to sites you did not ask for, or your internet provider's login page keeps appearing). Resetting takes a few minutes but is the right move if you suspect tampering.
If you are unsure whether you changed your DNS settings, check your network settings first. If you see custom addresses in the DNS fields, you changed them. If the fields are empty or say "automatic," you are using your ISP's DNS and do not need to reset anything.
Frequently Asked Questions
Will deleting DNS break my internet?
No. Clearing the cache or resetting to your ISP's DNS will not break your internet. Your computer will straightforward fetch fresh DNS lookups or use your ISP's servers instead of a custom provider. Internet access continues the whole time.
What is the difference between clearing cache and resetting DNS?
Clearing the cache empties the temporary list of website lookups your device has already done. Resetting DNS changes which server your device asks for new lookups — from a custom provider back to your ISP, or vice versa. Clearing cache is faster and solves most problems.
Do I need to reset DNS if I just want to switch from one custom DNS provider to another?
You do not need to reset to your ISP's DNS first. You can change directly from one custom provider to another by entering the new DNS addresses in your network settings. You only need to reset if you want to go back to your ISP's DNS or if you suspect tampering.
How do I know if my DNS has been hijacked?
Signs include being redirected to unexpected websites, seeing your ISP's login page when you did not request it, or websites you know are real showing "not found" errors. Check your DNS settings to see if custom addresses are present that you did not enter. If you find unfamiliar addresses, remove them and consider running a malware scan.
Should I clear my DNS cache regularly?
No. Your cache clears automatically and clearing it manually only helps if you are having a specific problem. There is no security or performance benefit to clearing it on a schedule.