How to change your DNS settings

When you type a website’s name into your browser’s address bar, the request is sent to a DNS server. Here, the name of the website is translated into a corresponding IP address—the actual address of the web server that hosts the site. For the most part, DNS servers quietly work in the background, creating the illusion that a website’s domain links directly to a web server.

Although most people don’t think twice about DNS servers, changing your DNS settings can improve your privacy and connection speeds. It can even help some users circumvent censorship. Switching servers is not difficult, as you’ll see by following the step-by-step instructions in this guide.

Why change your DNS settings?

When you go online, your Internet Service Provider (ISP) assigns you a DNS server by default. There are several reasons this might not be the best option:

  • Speed: The ISP-provided DNS server could be overloaded with requests. This will negatively affect your browsing speeds. If the server is down, you won’t be able to access any websites.
  • Hiding your location. Your ISP’s DNS servers reveal which country you’re connecting from. This isn’t helpful if you’re trying to access geo-restricted content from abroad, for example. So you can hide your location by changing your IP address.
  • Privacy: When you use your ISP’s DNS servers, every web request your device makes can be seen and logged by your ISP. In the US, ISPs have been allowed to sell your private browsing history since 2017. Although they all claim not to, the FCC still saw fit to begin an investigation into ISP privacy practices in 2019.
  • Block ads: Some DNS nameservers are set up to block ads. By blocking requests to domains that serve ads through DNS, you can prevent ads from ever reaching your devices. This makes you more secure, improves your browsing experience, and saves on data.

Using a VPN to change your DNS settings

A Virtual Private Network (VPN) allows users to create an encrypted connection to any server in the provider’s network. The better VPNs use their own DNS servers to ensure that users’ locations are kept private. If you want to change your DNS settings with a VPN automatically, follow these instructions:

  1. Sign up with a provider that uses its own DNS servers. We recommended NordVPN.
  2. Download and install the relevant app(s) for your device(s).
  3. Open the app and choose a server to connect to.
  4. Press “connect”. This connects you to the VPN server and switches the DNS server.
  5. Use the internet as you normally would.

Choosing a different DNS server

If you have any devices that aren’t compatible with VPN software, such as game consoles or smart TVs, then it’s still possible to change your DNS settings to those of the VPN provider. Using a Smart DNS service from NordVPN, Surfshark, or ExpressVPN, you’ll be given the DNS nameserver addresses to use with your device. For example, the IP addresses for NordVPN’s DNS servers are 103.86.96.103 and 103.86.99.103 at the time of writing.

You can use publicly available DNS servers if you don’t want to subscribe to a VPN. Free options (with their associated IP addresses) include:

  • Cloudflare: 1.1.1.1 and 1.0.0.1
  • Google: 8.8.8.8 and 8.8.4.4
  • Quad9: 9.9.9.9 and 149.112.112.112
  • OpenDNS: 208.67.222.222 and 208.67.220.220
  • Comodo Secure DNS: 8.26.56.26 and 8.20.247.20
  • CleanBrowsing: 185.228.168.9 and 185.228.169.9

Cloudflare is the best option if you want to find a happy medium between performance and privacy. It’s a large, well-established company with a global server network. It says it “does not sell user data to advertisers” or “mine user data”. Any logs are kept for 24 hours for debugging purposes, after which they are “purged”. Furthermore, the servers support the DNS over TLS (DoT) and DNS over HTTPS (DoH) protocols. These encrypt plaintext DNS traffic and help prevent man-in-the-middle attacks.

Those who prefer a more DIY, community-based approach to computing should investigate the OpenNIC project. This collection of hobbyists runs an alternative DNS network with a variety of free public DNS servers available.

Filtering

Some DNS servers allow users to filter content. For example, the CleanBrowsing DNS addresses listed above apply Security filters that block access to phishing, spam, malware, and malicious domains. CleanBrowsing also has DNS servers with a Family Filter that blocks access to sites with adult, pornographic, and explicit content. These are available at 185.228.168.168 and 185.228.169.168.

Control D has Social servers (76.76.2.3 and 76.76.10.3) that block access to social networks and stop malware, ads, and trackers from reaching your device. Other DNS-based ad and malware blockers include AdGuard DNS and NextDNS.

A more hands-on approach to blocking ads involves using Pi-hole, a custom DNS server for Raspberry Pi devices running the Raspberry Pi OS. A Pi-hole will block ads on any device connected to your home network. Read our in-depth guide on “How to block mobile ads with Raspberry Pi and Pi-hole”  if this sounds like something you might be interested in.

How to change your DNS settings

Once you know which servers you want to connect to, you can make the necessary changes to your device.

Changing DNS settings in Windows:

  1. Press the Windows key or click on the Windows icon in the toolbar
  2. Type “c” in the search field
  3. Click on “Control Panel”
  4. Click on “Network & Internet”
  5. Click on “Network and Sharing Centre”
  6. Select “Change Adapter Settings” in the menu on the left
  7. Right-click on your internet connection and select “Properties” from the drop-down menu
  8. Click on “Internet Protocol Version 4 (TCP/IPv4)” so that it’s highlighted
  9. Click “Properties”
  10. Click the radio button next to “Use the following DNS server addresses”
  11. Enter your new DNS settings into the “Preferred DNS server” and “Alternative DNS Server” fields. If you only have one address, leave the “Alternative DNS Server” field blank.
  12. Click “OK”

Changing DNS settings in macOS:

  1. Select “System Preferences” from the Apple menu.
  2. Click “Network”.
  3. Select your internet connection from the sidebar.
  4. Click Advanced.
  5. Click the DNS tab.
  6. Click the + button to add a new DNS server.
  7. Type in the addresses for your chosen DNS server.
  8. Click OK.
  9. Click Apply.

Changing DNS settings in Android:

  1. Open “Settings
  2. Tap “Network & Internet”.
  3. Tap “Private DNS”
  4. Select “Private DNS provider hostname”
  5. Enter the URL for your chosen DNS provider. Android uses DNS over TLS, which is an encrypted form of DNS that helps prevent man-in-the-middle attacks. It requires domain names rather than IP addresses. For CleanBrowsing, use: security-filter-dns.cleanbrowsing.org. For Cloudflare, use: 1dot1dot1dot1.cloudflare-dns.com. For Google, use: dns.google.
  6. Tap “Save” to finish

Changing DNS settings in iOS:

  1. Open “Settings”.
  2. Tap “Wi-Fi”.
  3. Tap the blue (“i”) button next to your wi-fi connection.
  4. Bring the “DHCP” tab to the forefront.
  5. Scroll down to “DNS” and tap on the existing IP address.
  6. Enter your chosen DNS servers’ IP addresses.
  7. Tap “Back”.
  8. Restart your device.

Changing DNS settings in Linux (Ubuntu):

  1. Open “System Settings”
  2. Open “Network”
  3. Select your internet connection, then click “Options…”
  4. Bring the “IPv4 Settings” tab to the forefront.
  5. Select “Automatic (DCHP) addresses only” from the “Method:” drop-down menu.
  6. Add your chosen DNS server addresses (separated by a comma) to the “DNS Servers:” field.
  7. Click “Save” and restart your system.

Can you change your router’s DNS server?

The benefit of changing your router’s DNS server is that the changes apply to every device connected to it. However, the process varies depending on which router you’re using.

To get started, the first thing you need to do is log in to your router. Type 192.168.1.1 or 192.168.0.1 into your browser’s address bar and enter your router’s login credentials. Depending on your router, options for changing DNS servers may be found under “Basic Settings”, “Network”, or “Setup”. As with the devices listed above, when you find the DNS area, enter the IP addresses of your chosen DNS servers and apply the changes.

How do you change DNS servers for a smart TV?

Not all smart TVs allow you to change DNS servers, but the process is largely similar across manufacturers. As a rough guide, start by going to the main menu and looking for “Settings” and then anything with “Network” in the title. You’ll next need to find the area dedicated to “IP settings” or similar, where you’ll be able to enter your new DNS addresses.

Changing DNS servers in a game console

As with smart TVs, the specific process for switching DNS servers varies between consoles. However, you can normally use a trial-and-error approach to make the necessary changes. Start by going to “Settings” and selecting “Network” (or similar). Look for “Set up internet connection” and the area specifying DNS servers. Make the necessary changes and save.