Your error might be unrelated to your attempt to block certain sites using the HOSTS file; anyway, this file does not block all subdomains, and it may be easier to block subdomains within ABP, using custom filters like this:
- Code: Select all
- The first one blocks content from example.com or its subdomains loaded on any page.
- The second tells ABP to close any popups to example.com or its subdomains.
- The third blocks all content loaded on any page on example.com or its subdomains.
- The fourth hides the visible content in any page on example.com or its subdomains.
ABP made the decision years ago that filters would not block connections from the address bar (the "document" request, blocking of which is known as "strict blocking"), but only connections made to fetch resources in the document. None of this blocks, say, a link to a malicious executable, so you should keep your HOSTS file around.
Also, uBlock Origin does support strict blocking, with custom filters like ||example.com^$document
(I think a separate $popup filter would still be needed to automatically close popups, and otherwise you'll just see a popup with the uBO blocked-site notification).
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.