Most people never need to touch filter rules — a good features" class="doc-internal-link">ad blocker handles the web out of the box. But when one stubborn ad slips through, or a site breaks in a specific way, custom filters let you fix exactly that. Here's how they work in 2026.
What custom filters are for
Filter lists (like EasyList) are large, community-maintained sets of rules that block known ads and trackers. A custom filter is a rule you add for a specific case the lists don't cover — for example:
- Hiding a leftover ad container that isn't caught automatically.
- Blocking a specific script or request on a site you use often.
- Allowing an element a list blocks too aggressively.
The two common rule types
Network rules block a request before it loads — useful for a specific tracker or ad domain. Cosmetic (element-hiding) rules hide an element that's already on the page — useful for an empty ad box that ruins the layout.
A typical element-hiding rule targets a page element by its CSS selector, so the slot simply disappears. DNDShield applies your rules alongside its main engine, so your custom entries layer on top of the standard blocking.
How to add custom rules in DNDShield
- Open the extension options and go to Custom rules (advanced).
- Add one rule per line.
- Save — your rules apply immediately on the next page load.
Step-by-step reference: Custom rules doc.
A few good habits
- Start narrow. Target one element or domain rather than broad patterns that might over-block.
- Test as you go. Reload the page after each rule to confirm it does what you expect.
- Prefer allowlisting for whole sites. If you just want to support a site, use the allowlist instead of writing rules.
FAQ
Do I need custom rules to block ads? No — DNDShield blocks the vast majority of ads automatically. Custom rules are for edge cases.
Can a bad rule break a site? An overly broad rule can hide too much. Keep rules specific, and remove any rule that causes trouble — see fixing sites an ad blocker breaks.
Where do standard rules come from? From maintained filter lists like EasyList and EasyPrivacy — see what DNDShield blocks.
Get started: Custom rules doc · Install DNDShield