Quick answer
Open Command Prompt as admin and run: ipconfig /release, then ipconfig /renew, then ipconfig /flushdns. That fixes it about 70% of the time. If not, move to the step-by-step below.
Why you're seeing this error
You connect to Wi-Fi, but the network icon shows a yellow triangle, and when you check the status, it says "Wi-Fi doesn't have a valid IP configuration". This means your PC's Wi-Fi adapter got an IP address from your router that's either expired, duplicated, or just plain wrong. It happens most often after you move from one Wi-Fi network to another (say, from work to home) and the old DHCP lease hasn't cleared. Or your router's DHCP server is flaky. Or sometimes a recent Windows update messes with the network stack.
The error shows up on Windows 10 and Windows 11, but the fix is the same for both.
Fix 1: Release and renew your IP address
This forces your adapter to ask for a fresh IP from the router. Do this:
- Press Windows Key + X and choose Command Prompt (Admin) or Windows Terminal (Admin). If it asks for permission, click Yes.
- Type
ipconfig /releaseand press Enter. You'll see your Wi-Fi adapter's current configuration disappear. That's normal. - Type
ipconfig /renewand press Enter. Wait a few seconds. You should see a new IP address appear, starting with 192.168.x.x or 10.x.x.x. If it hangs, wait up to 30 seconds, then close the window and try step 1 again. - Type
ipconfig /flushdnsand press Enter. No output means it worked. - Close the command prompt and test your Wi-Fi. Go to a website. If it loads, you're done.
What you should see after renew: A line like IPv4 Address. . . . . . . . . . . : 192.168.1.105. If you see a 169.254.x.x address, that's an APIPA address — it means your PC couldn't reach the DHCP server. In that case, skip to Fix 2.
Fix 2: Reset the network stack
If release/renew didn't work, the network stack itself might be corrupt. This wipes your network settings back to defaults. Your Wi-Fi passwords will be saved, but you'll need to reconnect to VPNs or custom DNS.
- Open Command Prompt as admin again (same as above).
- Type
netsh int ip resetand press Enter. You'll see a bunch of lines saying "Resetting..." — that's good. - Type
netsh winsock resetand press Enter. Wait for the message "Successfully reset the Winsock Catalog." - Restart your PC. Not just sleep or log off — a full restart.
When you come back, try connecting to Wi-Fi. It should work now. If not, move to the next fix.
Fix 3: Disable and re-enable the Wi-Fi adapter
This is the lazy fix but it works sometimes when all else fails. It forces the driver to reload.
- Press Windows Key + X and choose Device Manager.
- Expand Network adapters. Find your Wi-Fi adapter. It's usually named something like "Intel(R) Wi-Fi 6 AX200" or "Realtek RTL8822CE Wireless LAN" — anything with "Wireless" or "Wi-Fi" in the name.
- Right-click it and choose Disable device. A warning pops up — click Yes.
- Wait 10 seconds. Right-click the same adapter again and choose Enable device.
- Close Device Manager and reconnect to Wi-Fi.
What to expect: After re-enabling, the icon might stay yellow for a few seconds. Give it up to 30 seconds. If it stays yellow, move on.
Fix 4: Turn off IPv6
Sometimes your router gives out an IPv6 address that conflicts. Disabling IPv6 on the adapter can clear this up.
- Press Windows Key + R, type
ncpa.cpl, and press Enter. This opens Network Connections. - Right-click your Wi-Fi adapter and choose Properties.
- Find Internet Protocol Version 6 (TCP/IPv6) in the list. Uncheck the box next to it.
- Click OK, then close the window.
- Restart your PC.
Note: This won't break anything for 99% of home users. Most ISPs still use IPv4. If you have a rare IPv6-only ISP, you'll need to leave it on.
Fix 5: Reset the router (not the PC)
If none of the above work, the problem might be the router itself. A quick power cycle often fixes DHCP server glitches.
- Unplug the router's power cable. Also unplug any modem if you have one separate.
- Wait 60 seconds. Yes, a full minute. 30 seconds sometimes isn't enough to drain the capacitors.
- Plug the modem back in first (if you have one) and wait for all lights to stabilize. Then plug the router back in.
- Wait 2 full minutes for the router to boot and hand out IPs. Then try connecting on your PC.
What you should see: Your phone or other devices might also reconnect during this time. If they do, your router is working.
Alternative: Use a static IP
This is a workaround, not a fix. Use it only if the DHCP server is broken and you can't reset the router. You'll need to know your router's IP range. Usually it's 192.168.1.1 or 192.168.0.1.
- Open Network Connections again (ncpa.cpl).
- Right-click your Wi-Fi adapter, choose Properties.
- Double-click Internet Protocol Version 4 (TCP/IPv4).
- Select Use the following IP address.
- Set IP address to something like 192.168.1.50 (choose a number that's not in use, like 50).
- Set Subnet mask to 255.255.255.0.
- Set Default gateway to your router's IP (usually 192.168.1.1 or 192.168.0.1).
- Set DNS to 8.8.8.8 and 8.8.4.4 (Google's DNS).
- Click OK, then OK again. Test Wi-Fi.
Warning: If you pick an IP that's already in use by another device, you'll get a conflict and both devices will drop. Stick with a high number like 100 or 200.
How to prevent this from happening again
Most people see this error after switching networks — like coming home from Starbucks. The fix is simple: before you connect to a new network, forget the old one. In Windows, go to Settings > Network & Internet > Wi-Fi > Manage known networks. Find the old network, click Forget. This clears the cached DHCP lease.
Also, keep your Wi-Fi driver updated. Go to your laptop manufacturer's website (Dell, HP, Lenovo) and grab the latest driver for your model. Windows Update sometimes lags behind.
If it happens weekly, your router might be dying. Check the logs in the router's admin page (usually 192.168.1.1) for DHCP errors. If you see a lot of them, replace the router. A $50 TP-Link will be more reliable than a 5-year-old ISP-provided box.