One entry in my hosts file does not work

The last entry does not work.

: Written using Geany text editor
: sudo nano /etc/hosts
: hosts file may not exist
: Help from https://ubuntu-mate.community
:
: This is good for blocking sites that do not respect unsubcribe or are a gener>
: block www.facebook.com and quora.com etc.

127.0.0.1 www.quora.com
127.0.0.1 [email protected]
127.0.0.1 [email protected]
127.0.0.1 https://askubuntu.com/

change 'https://askubuntu.com/' to 'askubuntu.com' and it will work

3 Likes

Vielen Dank.

That will keep me from accidentally going there.

1 Like

Why not just use an iptables blacklist?

I just think that associating the "HOME" IP with multiple "foreign" hosts will confuse any legitimate processes that work with that address for identification/routing purposes. :frowning:

2 Likes

Eric, I have no problem using the entries in the hosts file (Ubuntu & Windows) from this link: Blocklist of hostnames and domains for blocking ads, trackers and others (format: hosts -- in hosts file format)

And this means more than 3400 entries "re-directing" to "localhost".

Everything works as expected. For years now :slight_smile:

Keep in mind: the entries are updated frequently (I update once a week).

And this in addition to a pihole (on a Raspberry Pi) for the entire local network + uBlock Origin & Privacy Badger in browsers.

4 Likes

Does that work?

Windows used to have similar but they stopped updated it.