How-toWi-Fi and Internet

Flush DNS and reset network settings

Clear your computer's DNS cache and reset network settings on Windows 11, Windows 10 or Mac, with the safest steps first and a clear warning before the last one.

Applies to
  • Windows 11
  • Windows 10
  • Mac

Rate this guide

When Wi-Fi shows connected but some or all websites will not load, your computer's saved network information may be out of date. Clear it, from the gentlest step to a full network reset, on Windows 11, Windows 10 and Mac.

What DNS is and why flushing helps

Websites have names such as example.com, but the internet finds them by number. DNS (the Domain Name System) is the lookup service that turns a name into a number. To save time, your computer keeps a short-term list of recent lookups, called the DNS cache. If an entry in that list is out of date or damaged, a site may fail to load even though your connection is fine. Flushing the DNS cache empties the list so that your computer asks again.

How a web address is found4 numbered steps, one under the other. The full text follows the picture.How a web address is found1You type a nameFor example, example.com2DNS looks it upYour computer asks a DNSserver3The answer is savedThis saved list is the DNScache4The page loadsYour device connects to thataddress
Flushing clears the saved lookups, not your files or passwords.
Text version of this diagram
  1. You type a name: For example, example.com
  2. DNS looks it up: Your computer asks a DNS server
  3. The answer is saved: This saved list is the DNS cache
  4. The page loads: Your device connects to that address

Before you start

  • Allow about 12 minutes.
  • Flushing DNS is safe. It deletes nothing except the saved lookups.
  • If the problem affects every device at home, restart the router first. See how to restart your router and modem.
  • Windows 10 no longer receives free security updates (support ended October 14, 2025). These steps still work, but keep banking and email to a supported device.
Steps to try, in orderA top-to-bottom flow chart with 8 boxes. Work through them in order and stop when the problem is fixed. The full text follows the picture.Steps to try, in orderNoNoNo1Flush the DNS cache2Do websites load now?Yes: You are done3Release and renew youraddress4Works now?Yes: You are done5Reset Winsock andTCP/IP (Windows)6Works now?Yes: You are done7Network reset (lastresort)Still no luck? Check therouter and your provider.
Stop as soon as websites load.
Text version of this diagram
  1. Step 1: Flush the DNS cache
  2. Question 2: Do websites load now? If yes: You are done. If no, go on to the next item.
  3. Step 3: Release and renew your address
  4. Question 4: Works now? If yes: You are done. If no, go on to the next item.
  5. Step 5: Reset Winsock and TCP/IP (Windows)
  6. Question 6: Works now? If yes: You are done. If no, go on to the next item.
  7. Step 7: Network reset (last resort)
  8. If nothing worked: Still no luck? Check the router and your provider.

On Windows 11 and Windows 10

Step 1: Flush the DNS cache

  1. Right-click the Start button. On Windows 11 choose Terminal (Admin). On Windows 10 choose Command Prompt (Admin) or Windows PowerShell (Admin).
  2. Select Yes if Windows asks for permission.
  3. Type this command and press Enter.
    ipconfig /flushdns
  4. Look for the message "Successfully flushed the DNS Resolver Cache."
  5. Open a web page to test.

Step 2: Release and renew your address

Your router gives your computer a temporary address. These two commands give it up and ask for a new one. The connection drops for a moment between them.

  1. In the same administrator window, type this command and press Enter.
    ipconfig /release
  2. Type this command and press Enter.
    ipconfig /renew
  3. Wait a few seconds, then open a web page. If you see an error saying the DHCP server cannot be contacted, the router is not answering, so restart it.

Step 3: Reset Winsock and TCP/IP

Microsoft lists these two commands in its Wi-Fi troubleshooting guide. Winsock and TCP/IP are the parts of Windows that handle network traffic. Some VPN and security programs add themselves to these parts, so you may need to check those programs afterwards.

  1. In the administrator window, type this command and press Enter.
    netsh winsock reset
  2. Type this command and press Enter.
    netsh int ip reset
  3. Restart the computer, then open a web page.

Step 4: Network reset (last resort)

Read this before you continue

Microsoft says network reset should be the last step you try. It removes your network adapters and their settings, then reinstalls them with defaults. You may need to reinstall VPN software or Hyper-V virtual switches, and networks may be set to the Public profile. Have your Wi-Fi password ready. It does not delete your files. If a school or employer manages the PC, ask them first.

  1. On Windows 11, open Settings then Network & internet then Advanced network settings then Network reset. On Windows 10, open Settings then Network & Internet then Status then Network reset.
  2. Select Reset now, then Yes.
  3. Wait for the PC to restart, then join your Wi-Fi network again and enter the password.

On a Mac

The Apple support pages used for this guide do not give a command for clearing the DNS cache, so this guide does not either. Restarting is the safe method, because the Mac starts with an empty cache.

Step 1: Restart and renew the address

  1. Choose Apple menu > Restart.
  2. If the problem remains, open Apple menu then System Settings then Network (macOS Ventura and later).
  3. Select your Wi-Fi network service, then select Details.
  4. Select TCP/IP. You may need to scroll down.
  5. Select Renew DHCP Lease. It appears only when the network uses DHCP, the usual setup at home.

Apple documents this path for macOS Ventura and later. On earlier macOS the page does not describe it, so search System Preferences > Network for the same options.

Step 2: Other Mac fixes

Turn Wi-Fi off and on again from System Settings then Wi-Fi, and keep your Wi-Fi password handy in case the Mac asks for it. See how to find your Wi-Fi password. For more steps, see Mac Wi-Fi problems.

If it still does not work

  • Try a different device on the same Wi-Fi. If it fails too, the cause is the router or your provider. See Wi-Fi connected but no internet.
  • Turn off any VPN and test again.
  • For a phone or tablet, see resetting network settings on a phone.
  • If only one computer fails, check the computer maker's support website for network updates for your model.

Frequently asked questions

Is flushing DNS safe?

Yes. It only empties the saved list of lookups. Your computer rebuilds it as you browse, so the first visit to each site may take a moment longer.

Do I need to run the commands as administrator?

Yes, for flushing DNS and the reset commands. Microsoft's steps use an elevated Command Prompt.

Will a network reset delete my files?

No. It resets network settings only, but you will need to reconnect to Wi-Fi and may need to set up VPN software again.

Can I paste commands I find online?

Only these exact ones, which match Microsoft's own guide. Never run a command because a pop-up, a caller or a stranger told you to.

Was this guide helpful?

Choose from 1 star (not helpful) to 5 stars (very helpful)

Rating this guide needs JavaScript. You can send feedback on the contact page instead.

Official resources used

Pages consulted while preparing this guide. Check them for the latest details.

Need more help?

If this guide did not solve your problem, send us a message and tell us what you tried.

Contact us

Beware of fake support

Real support never asks you to call an unfamiliar number, pay with gift cards or let a stranger control your computer.

Read how to stay safe online