Blocking all TLDs of a domain?


I'm a bit of a noobie, so please bear with me.

I am trying to blacklist a domain, pinterest, but pinterest has so, so ridiculously many top level domains that it's going to be impossible to do it all by hand. So Instead I tried my hand at regex but now I run into an issue where the entry is blank once I add it. I must be doing something wrong.

I thought that .*pinterest..* regex filter would work in order to block all the TLDs but since the entry becomes blank, there's probably something really wrong with it. I'm no good with regex. Could someone point me into the right direction?

What Pi-hole version are you on?
This sounds like an issue with RegEx that has been fixed already.

I also block pinterest and this is the blacklist regex I use


Turns out, for pinterest, you can just do a normal blacklist entry for

Any non-www is resolved and rewritten to www at their end, and the various TLDs are CNAMEs for .com, so the rule always kicks in. Sample below

1 Like

Thanks for your replies! I thought I had updated my Pi-hole but I suppose it didn't go right. It is now up to date and if I add the entry it no longer shows up blank.

Thanks for the regex, Chris! Simply adding didn't always work for me. I'm not sure why, but it seemed to work, and then it would sporadically stop working. It seems to get blocked and STAY blocked now!
I just noticed that pinterest not only uses '', but also '' That too should be blocked now if I did everything right.

Thanks for the help!

Same here @Plef, that was why I had a few TLDs previously configured. After your post I tested it yesterday and found that they were all blocked by that regex even though the TLDs were not explicitly configured. That's when it became apparent that they bounce non-www to www and use CNAMEs for all. So I binned the old rule and just have this now.

I just tested nl and sure enough it's similarly blocked. Interestingly, since the update yesterday, the Query Log now shows the actual domain blocked, eg "(blocked" via the CNAME, which is handy.

Bear in mind all this is unique to how pinterest handle their domains. Other companies will almost certainly need well-honed regexes to catch them all.

Pinterest's actual images appear to sit on subdomains of, so you can still view images indirectly if you need to (eg an image search on DuckDuckGo). Or you can block that too with the regex below.