It's inefficient to specify a large number of hosts in the facebook.com domain instead of blocking the whole domain. For this, you can run dnsmasq and use the "--address" option or "address" command in dnsmasq.conf: $ man dnsmasq [...] -A, --address=/ /[domain/] Specify an IP address to return for any host in the given domains. Queries in the domains are never forwarded and always replied to with the specified IP add…
Is there the concept of an 'administratively prohibited' error in the DNS? So your resolver could return an error with that code rather than an incorrect result.
Dnsmasq can return nxdomain responses
echo 'server=/.example.tld/' >> /etc/dnsmasq.conf
Check dnsgate [2] or FreeContributor [3]
[1] https://www.dnsknowledge.com/whatis/nxdomain-non-existent-do...