Regex Not Working for Sub Sub Domains

Hi Everyone,

Expected Behaviour:

Setup up a regex entry `[:alnum:]*.cl.yahoo.com to block anything that appears before "cl". There seems to be a whole bunch of NXDOMAIN requests going to that subdomain. E.g 6rtq-.cl.yahoo.com . The expectation is that all requests going to the subdomain before .cl gets blocked

Actual Behaviour:

None of the requests are getting blocked. I validated the command on regex101 but no dice. I tried multiple combinations of the regex but nothing gets blocked. I don't have Yahoo in any of my whitelists.

Any suggestions?
Pi-hole Version v5.0 Web Interface Version v5.0 FTL Version v5.0

Thanks.

Have a look at https://docs.pi-hole.net/ftldns/regex/overview/#pi-hole-regex-debugging-mode for some information that may help you.

1 Like

Add this domain to your blacklist as a wildcard. Pi-hole will convert it to:

(\.|^)cl\.yahoo\.com$

1 Like

Tried doing that and got the error While executing: UNIQUE constraint failed: domainlist.domain
Added 0 out of 1 domains

That is because the same domain is already in the gravity list. Delete all previous entries for that domain.

1 Like

Thanks. That worked. I need to make sure in the future to check if something already exists as I saw this error a few times.