@hairybiker If you have the web interface http://pi.hole/admin installed, you can go to the Query Log which will directly show you which of the domains along the CNAME path was blocked. Else you can do what Dan suggested and query the blocking lists for the contained domains.
Deep CNAME inspection is a new feature that comes with v5.0. It will help to block ads covering under CNAMEs.
That was the o/p. Direct copy paste @jfb I DON'T want to block them they link to Amazon ebooks.
As I said it was working perfectly before upgrading to 5.0.
Today the website is doing direct links to Amazon, yesterday it was via link.freebooksy.com @DL6ER
root@PiHole:~# pihole -v
Pi-hole version is v4.3.2-421-gb73580f (Latest: v4.3.2)
AdminLTE version is v4.3.2-426-gdd7b2b2 (Latest: v4.3.3)
FTL version is vDev-61d67ff (Latest: v4.3.1)
$ pihole -q cb.sailthru.com
Match found in https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts:
cb.sailthru.com
$ pihole -q link-nj1.sailthru.com
[i] No results found for link-nj1.sailthru.com within the block lists
Can confirm sailthru.com is on Steven Black's master list:
Match found in https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts:
ak.sailthru.com
api.sailthru.com
cb.sailthru.com
cdn.sailthru.com
condenast-a.sailthru.com
condenast-b.sailthru.com
condenast-c.sailthru.com
horizon.sailthru.com
horizon-nj1.sailthru.com
njmta-173.sailthru.com
ny1mta-31.sailthru.com
ny1mta-56.sailthru.com
ny1mta-58.sailthru.com
Match found in https://hosts-file.net/ad_servers.txt:
cdn.sailthru.com
horizon.sailthru.com
I am a bit dyslexic so my fault I mistyped
but " link does but it points to a domain you’ve asked Pi-hole to block." I am NOT asking to BLOCK it but to ALLOW it.
2020-02-21 17:52:50 A link.freebooksy.com octo.lan Unknown (9) CNAME (48.1ms)
Okay, you've got cb.sailthru.com on your blocklists. You've asked for link.freebooksy.com.
In version 4 we would just check for link specifically on the blocklists. Advertisers have become more deceiving in their methods and have now started to make thinks like link as alternate names (CNAMEs) to actually go to other domains. They hide the domains you want blocked behind other names.
Version 5 takes the query for link and checks all the names that link means. In this case link is actually cb.sailthru.com and since you want cb blocked, we block it and any other name that it appears as.
So in this case link is hiding the fact that it's actually cb.sailthru and doing what you've asked.
If you instead want to allow cb then whitelist cb. If you just want to allow link and not cb everywhere then whitelist link.