Using Google Public DNS can significantly improve the speed, security, and reliability of your internet browsing experience. DNS (Domain Name System) is what translates human-friendly domain names (like google.com) into IP addresses. By switching from your ISP’s default DNS to Google’s public resolvers, you gain faster response times, enhanced security, and better uptime.
This guide walks you through how to configure Google DNS (8.8.8.8 and 8.8.4.4) on various systems, including:
Linux (Ubuntu, CentOS)
Windows (10/11)
macOS
Router (for network-wide DNS change)
Primary DNS: 8.8.8.8
Secondary DNS: 8.8.4.4
These DNS servers are globally distributed, secure, and maintained by Google with privacy and performance optimizations.
Edit the config:
Add or update the DNS section:
Apply changes:
Then add:
Edit your connection file:
Add or update:
Restart networking:
Press Windows + R, type ncpa.cpl, press Enter.
Right-click your active network connection → Properties.
Select Internet Protocol Version 4 (TCP/IPv4) → click Properties.
Check “Use the following DNS server addresses”.
Enter:
Preferred: 8.8.8.8
Alternate: 8.8.4.4
Click OK, then Close.
🧠 Optional: Repeat for IPv6 with 2001:4860:4860::8888 and 2001:4860:4860::8844.
Go to System Settings → Network.
Select your connection (Wi-Fi or Ethernet) → Details.
Click DNS.
Remove existing servers and add:
8.8.8.8
8.8.4.4
Click OK and Apply.
Access your router’s admin page (usually 192.168.1.1 or 192.168.0.1).
Log in with admin credentials.
Navigate to Network → LAN/DHCP or Internet settings.
Find DNS Settings.
Set:
Primary DNS: 8.8.8.8
Secondary DNS: 8.8.4.4
Save and reboot router if required.
🔒 Bonus: This ensures all devices on your network benefit from Google DNS — smart TVs, IoT devices, etc.
Use one of the following commands:
You should see:
Or visit:
🔍 https://1.1.1.1/help to check current DNS
Google DNS supports DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) for encrypted queries.
You can use clients like dnscrypt-proxy or switch to Google DoH endpoints for privacy-focused configurations.