How to Set Up Google Public DNS for Enhanced Internet Performance

Google Public DNS boosts your internet experience by offering faster, more secure, and reliable domain name resolution. The Domain Name System (DNS) converts user-friendly names (like google.com) into IP addresses. Switching to Google’s public DNS servers (8.8.8.8 and 8.8.4.4) from your ISP’s default provides quicker lookups, improved security, and greater uptime.

This guide simplifies configuring Google DNS across multiple platforms, including:

  • Linux (Ubuntu, CentOS)

  • Windows (10/11)

  • macOS

  • Routers (for network-wide DNS updates)

What Are Google Public DNS Servers?

  • 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.

Method 1: Configure Google DNS on Linux

Ubuntu / Debian (with netplan or NetworkManager)

For systems using Netplan (/etc/netplan/*.yaml):

  1. Edit the config:

sudo nano /etc/netplan/01-netcfg.yaml
  1. Add or update the DNS section:

network:
version: 2
ethernets:
eth0:
dhcp4: no
addresses: [192.168.1.10/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
  1. Apply changes:

sudo netplan apply

Using resolv.conf (older systems):

sudo nano /etc/resolv.conf

Then add:

nameserver 8.8.8.8
nameserver 8.8.4.4
Note: On modern systems, this file is often auto-generated. Use systemd-resolved or netplan instead.

 CentOS / RHEL

  1. Edit your connection file:

sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0

Add or update:

DNS1=8.8.8.8
DNS2=8.8.4.4
  1. Restart networking:

sudo systemctl restart network

Method 2: Configure Google DNS on Windows 10/11

  1. Press Windows + R, type ncpa.cpl, press Enter.

  2. Right-click your active network connection → Properties.

  3. Select Internet Protocol Version 4 (TCP/IPv4) → click Properties.

  4. Check “Use the following DNS server addresses”.

  5. Enter:

    • Preferred: 8.8.8.8

    • Alternate: 8.8.4.4

  6. Click OK, then Close.

🧠 Optional: Repeat for IPv6 with 2001:4860:4860::8888 and 2001:4860:4860::8844.

 Method 3: Configure Google DNS on macOS

  1. Go to System SettingsNetwork.

  2. Select your connection (Wi-Fi or Ethernet) → Details.

  3. Click DNS.

  4. Remove existing servers and add:

    • 8.8.8.8

    • 8.8.4.4

  5. Click OK and Apply.

Method 4: Configure DNS at the Router Level (Network-Wide)

  1. Access your router’s admin page (usually 192.168.1.1 or 192.168.0.1).

  2. Log in with admin credentials.

  3. Navigate to NetworkLAN/DHCP or Internet settings.

  4. Find DNS Settings.

  5. Set:

    • Primary DNS: 8.8.8.8

    • Secondary DNS: 8.8.4.4

  6. Save and reboot router if required.

🔒 Bonus: This ensures all devices on your network benefit from Google DNS — smart TVs, IoT devices, etc.

Test Your Configuration

Use one of the following commands:

nslookup example.com

You should see:

Server: 8.8.8.8
Address: 8.8.8.8#53

Or visit:

Security & Privacy Notes

  • 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.