Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In attempting to configure DansGuardian I've had difficulty blocking certain search sites, though it also differs between browsers.

I'm using the word "twerk" for testing as there's no instance of it in the bundled DansGuardian lists. I've added the following lines to files:

lists / bannedregexpurllist: (^|[\?+=&/])(.*=twerk.*)([\?+=&/]|$)

lists / phraselists / pornography / weighted:


dansguardian.conf: weightedphrasemode = 1 # cumulative from phrase occurances

Sites where the URL contains the word "twerk" should be blocked, as well as sites containing even a few occurrences of the word (my naughtynesslimit being 160). This should block all such sites.

Every site I've tried, except a few search engines, get blocked. The failures occur with the following search engines:

Some of these require certain browsers to fail (Chrome is the worst), while others, like DuckDuckGo, can even load a page full of twerk related links in ELinks.

This issue is not just with the word "twerk". It occurs with all words that would otherwise get blocked.

So why isn't DansGuardian filtering these pages, and how do I make it work as expected?

I'm (almost) certain I've got Squid and Dansguardian running correctly. Blocking is working in every other circumstance (that I've tested). In case it help, I'm running Arch Linux and used the DansGuardian ArchWiki Page as my guide.

share|improve this question
Ironically I can't even view this page without disabling DansGuardian. – Michael Plotke Oct 12 '13 at 1:15

It is likely that the page is being loaded in pieces with javascript. This makes it harder to block based on content for those search engines.

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.