DNS is the internet's address book - it turns names like example.com into the IP addresses your device actually connects to. By default you use your ISP's DNS servers, which are sometimes slow or unreliable. Switching to a fast public resolver can speed up page loads and fix sites that will not open. Here is how.
The best free public DNS for 2026
- Cloudflare - 1.1.1.1 (and 1.0.0.1): focused on speed and privacy.
- Google - 8.8.8.8 (and 8.8.4.4): fast and extremely reliable.
- Quad9 - 9.9.9.9 (and 149.112.112.112): blocks known malicious domains for an extra layer of safety.
Enter both a primary and a secondary so there is a fallback.
Change it on one device or the whole network?
Setting DNS on a single device only affects that device - handy for testing. Setting it on your router applies it to everything on your network at once. Test on one device first; if it helps, set it router-wide.
On Windows
Settings > Network & Internet > your adapter > Edit DNS settings > switch to Manual, turn on IPv4, and enter the addresses above. Then flush the cache with ipconfig /flushdns.
On a Mac
System Settings > Network > your connection > Details > DNS, then add the servers with the + button.
On your router
Log in (how to log in to your router) and look under Internet/WAN or DHCP settings for DNS Server fields. Replace the automatic entries with your chosen resolvers and save. Because your router hands out DNS to clients via DHCP, every device picks up the change automatically.
When changing DNS actually helps
If ping 8.8.8.8 works but websites will not load by name, DNS is your problem and switching resolvers often fixes it instantly. That test and more are in our guide to WiFi connected but no internet.