Clean up the web by switching to a DNS server that hides ads

Alternative DNS servers that block adverts clean up the web

Clean up web pages and remove ad irritations with a tweak to the computer or phone DNS server settings. Whether you have a Mac, PC or phone, this ad-blocker is free and no app to install.

Adverts on the web are controversial and few people like them, but they do support a lot of websites and services and they make online content free. Adverts are necessary, but do there have to be so many? Some websites are just advertising hell and they spoil it for the responsible sites that keep the ads to a minimum.

If ads are driving you nuts, block them by switching DNS servers on your computer. This is free and requires no software to be installed on your computer or phone. It is just a change to the internet settings.

What is DNS and what is it for?

Every device that is connected to the internet has an IP address, which consists of a set of numbers like 123.56.43.201, but if we had to type those into the address box in our web browser we would find it difficult to remember more than two or three websites.

Instead, we use domain names like google.com, microsoft.com. apple.com, facebook.com and so on. DNS (Domain Name System) is a lookup service that converts human-friendly domain names into IP addresses, a set of numbers computers and phones can use to make a connection with a remote device running a website or service.

A computer, phone or tablet needs a DNS server to function on the internet and it would not work without one. ISPs (internet service providers) run DNS servers so that customers can easily access the internet with their computers, phones, tablets and other devices. When a device connects, it is gets the DNS server addresses from the ISP.

A device does not have to use the ISP’s DNS servers and usually only does so because it is automatic and does not require the user to do anything. Switch on your device and it just works because DNS setup is automatic.

However, it is possible to manually configure computers, phones and tablets to use a different DNS server, one of your choosing, but why would you bother to do this? The reason is that an alternative DNS server may be faster, more private, more responsive, more secure, or may provide other benefits that make it worthwhile switching, like blocking irritating ads.

Block ads with AdGuard DNS in macOS

AdGuard provides free public DNS servers that come in that ‘other benefits’ category and after configuring your computer to use AdGuard DNS, adverts magically disappear from web pages. The AdGuard DNS servers block ads, which makes the web faster, makes web pages cleaner, and makes the internet a lot less annoying.

When a computer, phone or tablet is configured to use a DNS server, it is used for all internet access by every program, and that includes all web browsers, email clients, and apps. All internet traffic uses the DNS server settings and so adverts are blocked in everything, everywhere.

It does not matter whether you are using an Apple Mac, Windows PC, or Linux PC, all can be configured to use an alternative DNS. Here is how to switch DNS on an Apple Mac:

Entering AdGuard DNS server settings on an Apple Mac in System Preferences
Apple Mac DNS settings
  1. Open System Preferences and click Network
  2. Select the connection on the left – usually Wi-Fi
  3. Click the Advanced button at the bottom
  4. Select the DNS tab
  5. Click the plus at the bottom
  6. Enter a DNS server IP address
  7. Click OK and then Apply

DNS servers often, but not always, come in pairs and to use AdGuard, enter these four IP addresses (two pairs, one for IPv4 and one for IPv6):

94.140.14.14
94.140.15.15
2a10:50c0::ad1:ff
2a10:50c0::ad2:ff

These will be fine for most people, in fact, just the first two DNS addresses will work for most people. However, if you want the internet to be ‘family safe’ and to automatically block adult content as well as adverts, use these addresses instead:

94.140.14.15
94.140.15.16
2a10:50c0::bad1:ff
2a10:50c0::bad2:ff

Once added, they will be used straight away and there is no need to reboot the computer. They will continue to be used until you either delete them or enter an alternative.

Block ads with AdGuard DNS in Windows

  1. Press Windows+I to open the Settings app
  2. Click Network & Internet
  3. Click Network and Sharing Center (it’s in the Control Panel too)
  4. Click the Wi-Fi link with the network name on the right
  5. Click the Properties button
  6. Double click Internet Protocol Version 4
  7. Select Use the following DNS server addresses
  8. Enter the DNS addresses 94.140.14.14 and 94.140.15.15
  9. Click OK to close the window
  10. If Internet Protocol Version 6 is enabled, repeat steps 6 to 9 and enter 2a10:50c0::ad1:ff and 2a10:50c0::ad2:ff
Windows DNS settings
Windows DNS settings

The menus and buttons are different in Windows and macOS, but the process is the same and the same DNS addresses are used. The first two simpler DNS addresses are the important ones and the second ones may not be needed.

How to remove AdGuard DNS

Deleting all the DNS server addresses that were added and emptying the list in macOS means that the default servers are used, which are automatically provided by the ISP. In Windows, just select Obtain DNS server address automatically.

Advantages of AdGuard DNS

Browsing the web with AdGuard is great because the DNS servers block most adverts. It cannot block all adverts and one or two may slip by, but it does work very well. The web is faster and cleaner and mostly ad-free. Less data and bandwidth is used and websites load faster because adverts are often the slowest components of a web page to load.

There are also some security features with AdGuard DNS and bad websites associated with fraud are blocked too.

Disadvantages of AdGuard

Blocking adverts may leave empty spaces on the web page. This isn’t really a problem, but in some circumstances it may cause the page layout to look a bit odd. It depends on the site design. Just ignore it.

Website with adverts hidden by AdGuard
Those white spaces used to contain adverts

The main problem is that websites cannot be whitelisted to allow adverts. Some websites are just advertising hell with huge ads, pop-ups, videos that can’t be stopped and more irritations. They are driving the rise in ad blocking and making it worse for everyone.

With AdGuard DNS, good websites that only have minimal advertising that does not get in the way will also be blocked along with the bad sites and the owner may depend on ads to keep the site running. If you deprive a site of its income then its future must surely be in doubt.

For this reason, I don’t personally use AdGuard DNS. I don’t like ads and really don’t like sites that plaster them all over their site, but I want to support smaller sites that rely on ad income and show only minimal advertising. I therefore allow ads and just avoid going to ad-heavy sites as much as possible.

Not only can you not whitelist sites, you cannot easily switch between using AdGuard DNS and using normal DNS servers that allow ads.

Switching can be made slightly easier by adding more DNS servers. Add 1.1.1.1 to the DNS list for example, which is Cloudflare’s fast and private DNS server that does not track you or sell your data. (Your ISP can track the sites you visit using DNS if it wants to, and maybe some do.)

DNS settings in System Preferences on the Apple Mac
Apple Mac DNS settings

DNS servers are always used in the order in which they appear in the list, so with AdGuard at the top, adverts will be blocked, but if Cloudflare is at the top, adverts will be allowed.

Click and drag the 1.1.1.1 DNS server to the top of the list to make it the default or drag it to the bottom to make AdGuard the default.

AdGuard offers apps and browser extensions that get around the problem and they enable sites to be whitelisted to allow ads, but I’ll look at those at another time. For now, just add these DNS servers and drag Cloudflare up or down the list to turn ad blocking on or off.

Related articles


Recommended software (affiliate links):

Get the Apple Mac maintenance tool, CleanMyMac X: Uninstall app leftovers, block, remove malware, free disk space, optimize your Mac. Learn more

Keep your Apple Mac fast, clean and organized with MacCleaner Pro. Analyze disk space, clean junk, remove software bloat. Learn more



Recommended VPNs for privacy & security (affiliate links):

NordVPN: View plans
Hide.me VPN: View plans
Surfshark: View plans
PureVPN: View plans
Ivacy VPN: View plans
PrivadoVPN: View plans


About Roland Waddilove 404 Articles
Roland Waddilove is interested in technology: Computers, phones, gadgets, software and internet. Long ago he worked on computer magazines, but is now mostly a tech writer for the web.