We were talking about YouTube specifically.
So we know that ads and videos are served from the same YouTube domains. So you can’t block based on that.
We also know that when you click a video YouTube calls the YouTube api and asks for what to show - likely an ad url and or a video url. Of course uBlock can filter on that an pi hole can’t.
What I was actually talking about was if you are in the US that YouTube api knows you are there ‘somehow’ and sends back 1 of a million YouTube ads for the US.
If on the other hand you are in some tiny obscure country it will send you 1 of maybe 100 ads available - in other words you will see a lot less ads in a small obscure country than the US.
Now the question is how does it know which country you are in? There’s a few possibilities:
it checks which ip the request comes from ie your ip.
when you request the dns for some domain let’s say api.youtube.com, the dns server sends the ip of a google server setup to respond with ads AND videos for your country. Basically a regional server that handles all YouTube api requests. We still can’t block this ip as it’s needed by YouTube for everything.
I would have assumed it was 1) BUT testing out some vpn servers which show the ip as US I see Dubai ads.
This leads me to think this vpn setup may be using a Dubai dns server which incorectly sends back ips for google servers in Dubai. Ok their setup is broken but it raises the question that could 2) be how youtube serve you ads for your country?
Most public dns servers should serve you local ips based on where you are requesting from - but some probabaly don’t. Has anyone tried an alternative dns and actually got ads from a different country ever?
Someone further up said they did exactly that, I was skeptical but after the vpn test I did it may be worth a second look.
Edit: I am neither in US or Dubai so it’s got nothing to do with where I really am!