Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
  • I use AdBlock with the default filter.
  • I use this exception:$document
  • I still want to block regardless of exceptions.

How can I write an AdBlock filter rule to allow everything from except requests to

share|improve this question

3 Answers 3

Easiest way that doesn't involve dealing with AdBlock Plus in any form would be to add this line to the end of your hosts file:

Here's a list of directories your hosts file would be in depending on your system:

share|improve this answer
This helps, but it leaves a broken image link icon, whereas I think a proper ABP filter would cause the whole <img> tag to be removed from the page. – Spiff Aug 5 '13 at 22:31
You could also try left clicking on the ADP icon in the Address bar and Click Create Easy Filter. Try to get it to highlight the entire element you want hidden using your mouse and click. It will automagically create the appropriate filters. For more information on element hiding with ADP, look at: – djfdat Aug 6 '13 at 5:55
I think by the time you made this latest comment you'd forgotten what I wrote in my Question. Your latest suggestion doesn't meet my requirements for two reasons: (1) I have exempted. So I need a filter rule that will override the exemption just for that one advertiser's ad, or a way to modify the exemption rule to exempt every ad on that site except the offensive one. (2) I don't want to hide the entire element from The Deck, because I don't mind The Deck's other ads. I'm aware of the filter syntax for ABP, I just can't figure out how to use it to accomplish what I'm after. – Spiff Aug 6 '13 at 6:37

Blocking and element hiding are two different things. The exception rule you have for just means that web requests will not be blocked, but that does not preclude using element hiding rules. The Element Hiding Helper extension used with AdBlock Plus will very handily propose hiding rules of greater or lesser specicifity when a page element is clicked, and you can usually choose the one that will hide no more and no less than the part you object to.

share|improve this answer
I don't think this meets my requirements, since I don't want to block all the ads that show in that spot. I just want to block the ones from the Apparel vendor in America that displays women as sex objects. I believe the ad-related elements from "The Deck" ad network are the same, regardless of which advertiser's ad happens to be shown on a given reload. – Spiff Aug 27 '14 at 5:23


  • Make an exception on a, but only for not b.

Implementation with AdBlock filter rules:

  • @@/^((?!altfarm\.mediaplex\.com).)*$/$
  • @@||^$elemhide
  • ||

Here's what the rules do:

  1. Make an exception for any HTTP request to a URL not containing from Note: regexes can slow down your browsing experience if you use too many.
  2. Make an exception for the element hiding rules on
  3. Block any requests to

AFAIK AdBlock doesn't provide OOTB syntax for non-exceptable rules or enforcement levels.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.