SRoy
August 19, 2021, 9:56am
1
Let's say I wanted to block the word magnet , both in domain and subdomain.
So, magnet at DuckDuckGo should be blocked, as it has the word magnet in it, and https://www.magnetshop.com/ will be blocked as well.
I tried adding magnet as a wildcard, but it didn't work. So, how would I do it?
(of course I wouldn't block the word magnet, but other niche bad words, because someone is a little too curious in my house)
You can't.
In the first example, magnet isn't part of the domain. The domain is duckduckgo.com
, no magnet in there. Pi-hole can't do anything ouside the domain, because it will never see that (not part of the query).
Use regex101: build, test, and debug regex to test your regexes.
2 Likes
SRoy
August 19, 2021, 10:08am
3
so what about the second example, can anything be done about that?
DL6ER
August 19, 2021, 6:59pm
6
Even simpler:
magnet
being exactly equivalent to ^.*magnet.*$
, however, much less work to be computed.
1 Like
system
Closed
September 9, 2021, 7:00pm
7
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.