Forked from a different thread - why not list all subdomains of a website you don't want to use, and then blacklist them all?
And on top of that, many famous services (Google, Facebook etc.) ask for your mobile number... why is that? Well, tracking becomes easier. They can associate phone numbers with social media profiles. You gain safety, but you lose freedom.
That doesn't provide safety, it increases the risk of a sim swap attack.
This is how you get safety from them:
grep facebook.com /etc/hosts
~
I'll stop going off-topic now
I have an idea for improving privacy - For each privacy-invading website, someone should track all its subdomains in a text file, which can then be copied and pasted into the /etc/hosts file automatically.
I'd still prefer some folder like /etc/hosts.d where you can put files for any website in individual files. That'll make it much simpler to add new subdomains without breaking everything. Maybe using something like
https://unix.stackexchange.com/questions/60549/etc-hosts-file-refer-to-another-configuration-file