Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

AFAIK ads on google search results can't be blocked by DNS alone.


Can you provide a working example?

I certainly block plenty of Google-controlled domains. I normally do not use Google search and even when I do I never seems to trigger any ads. Maybe I am just not searching for things people want to sell. In the rare event I do trigger an ad, because I am not using a "modern" browser to do searches, these ads are not distracting and I can easily edit them out of the text stream if I want to.


>Can you provide a working example?

Literally any search that uses the "expensive" keywords[1]. "car insurance quotes" would do nicely, for instance.

[1] https://www.wordstream.com/articles/most-expensive-keywords


It looks like even with all the more recent nonsense Google inserts into the results it is still easy to just extract the result URLs and leave behind the rest of the crud. If you want to retain the description text it is a little more work.

Interestingly, the /aclk? Ad URLs do not use HTTPS.

Seeing that these Ad URLs are still unobtrusive, I am wondering why anyone would want to remove them from the search results page. For cosmetic reasons?

I prefer searching from the command line. To remove the /aclk? Ad URL's I used sed and tr.

   #!/bin/sh
   # usage: $0 query > 1.htm
   # 
   x=$(echo y|tr y '\004');
   z=$(echo https://www.google.com/search?q=$@\&num=100|sed 's/ /%20/g');
   curl --resolve www.google.com:443:172.217.17.100 -Huser-agent: "$z"|sed "s/<a href=\"\/url?q=/"$x"&/g"|tr '\004' '\012'|sed -n '/url?q=/{s/.url?q=//;s/&amp;sa=.*\"><h3/\"><h3/;s/&amp;sa=.*\"><span/\"><span/;s/$/<br>/;/aclk?/d;p;}'




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: