How do I determine what domain an ad is coming from?


Block ads or fix broken sites

This FAQ is written in the context of finding out how to block a ad that isn’t blocked automatically, but the same steps can be used to troubleshoot issues with sites that don’t function properly. An example is that sometimes certain payment gateways try to collect metrics on the sale, but these domains are blocked by Pi-hole, so the payment cannot be processed. Also, some links send you through several referrers and if one of them is blocked, you may land on a blank page instead of the site you meant to go to.

Pi-hole blocks many ads, but not all of them

Pi-hole sources it’s ad domains from third parties, so you may run into an advertisement that is not part of one of those lists. You can easily add a domain to the blacklist using the pihole -b command, or via the Web interface. In order to do this, you need to find out where the ad is being served from.

#Tools To Use

The Pi-hole Query Log

You can view the log in real time as it happens using pihole -t. Run this command while you browse to the site that is showing ads. As the page loads up, watch the output in your terminal to track down what domains are being queried.

The same information is also available in the Web interface.

##DNSThingy Whitelist Assistant
This Chrome extension will list all of the domains that are queried when a Web page is loaded. You can often look at the list of domains and cherry pick the ones that appear to be ad-serving domains. If nothing else, this can help narrow down the search.

##Chrome’s Inspector
To find the exact domain an ad is served from, you can use the developer tools built into Chrome. Just right click an advertisement and choose inspect.

This will open a split screen view, that lets you see the Web page’s information, including what we are interested in finding, the domain name the advertisement is coming from.

Once you find this domain, just add it to your blacklist.

Difficult Ads

Some Websites self-host their ads, making them difficult to block with Pi-hole because if you block that domain, the site you are trying to get to won’t load. But often, Websites will use an advertising network such as Google Ads, so the advertising content is hosted from Google’s servers instead of the site the ad is being displayed on.

Doesn't really block
Some popups aren't getting blocked
Country specific Block list (Australia)
Request: Custom Blacklists
How to whitelist Xiaomi Mi Vacuum Robot?
Ads are still showing in "Free video chat online" (Android App) (NSFW)
Any way to block app ads?
Finding an ad on a site
Can't access Apple App Store
Remove the Banner Ad on the Fire TV Home Screen
Can't watch Fox News Live?
How to sort out site issues?
Pihole (and other adblockers) block reviews for clothing sites: how to fix?
Cross Media Panel - Whitelist
Blocking Alexa (Amazon voice assistant)
Blocking reCAPTCHA?
Whitelist Android Commercials
Pihole blocking all hotukdeals links
JS problems on Kickstarter?
Certain pages won't load in Safari
Kodi no longer working after pihole install
Can`t browse around the webpage
Block Ads on Viber Desktop
Images on being blocked
How do I block the ads on (NSFW)?
Where can I req a filter of a webbpage?
Youtube history
Blacklisted ads keep reappearing
List to block popular games
Blocking ADs
How to access with pihole running?
Flipboard Advertisements - Can the advertisements be blocked? video's won't play
Blocking radio buttons on Orvis and L.L.Bean
AMC Streaming being blocked
Cant figure out whitelisting
Apple TV tv anywhere apps
Pihole still blocking google play store seems to be blocked but
Xbox app not working with pi-hole enabled
Hulu videos aren't playing still has some ads showing
Cannot login in paypal app (iphone)
Google ads are not blocked
NVIDIA driver install problem
Traffic and public transport widgets on iphone
Pandora on android still gets ads
How to debug a website that doesn't work properly
Smart TV, Sony KDL-48WD650

A post was split to a new topic: Finding an ad on a site