Ive been using the host file to block 1000's of sites for years and it works great. Except for one site: ecosia.org. Does anyone know why? The lines below are from my host file (without the space between . and org. I had to put the space there to be able to post it on this board)
Your question was quite interesting so I had to track it down. This site is hosted on CloudFlare. Apparently, CloudFlare is using a new, secure DNS service that effectively bypasses your /etc/hosts overrides. I found the answer here: -websites-bypass-hosts-file-in-safari
Unfortunately, it doesn't look like there is any way around it. I guess I could use this as an excuse to try to dissuade you from using the hosts file like this. I realize it is popular as a DIY adblocker. I even know of one app called "covenant eyes" that continually rewrites the contents of the hosts file in an attempt to block web site requests for people whose Christian faith is stronger than their self-control and technical skill. And then there is another for people whose Christian faith is weaker than their children's technical skill. On the other side of the spectrum, it is also a popular method for software piracy.
But really, this is a configuration file intended for network admins to roll their own DNS and developers to test websites. Just get yourself a decent web blocker. Apparently, ecosia is pretty active on the adware front. It sounds like they've found a way to bypass these DIY adblockers.
in that way you can find-out / know ,what dns server ip-address is used by an app inside your computer, as you started ecos.. app inside your computer, so its very likely thats what used the dns-server.
what i'm talking about is, how to stop unwanted websites (domain-names, sub-domain names, etc), in various or all apps that we use in our computer completely, or stop unwanted websites completely from router config.
There are various+MANY web tools & standalone tools that can reveal all hosts name , sub-domains, ip-address, etc etc used by a domain or sub-domain or a host, etc , even if its under a cloudflare/cloudfront, etc dns managed.
if your computer is assigned a fixed ip-address by your DHCP in Router (or you manually set a fixed ip-adrs inside network-adapter), then in router's firewall rules, you can easily specify for which local computer you want to drop outbound unwanted sites.
My school issues us laptops, which obviously has filtering. But, the filters don't work at home. And somehow, they can't block Google+, even at school, so they just pointed plus.google.com to 127.0.0.1. Is there any way I can ignore the hosts file so that I can get to Google Plus?
If the domain is not listed in the hosts file, the local DNS server will get queried for what the domain has for IP address. If the local DNS server does not have a record of this domain either, it will forward this request to the internet DNS server (the one from the internet provider)
As you can see, the hosts file is the first place a DNS is being set, but its local on the pc. So anyone with administrative rights can edit it. If you have an administrator account, you can edit your hosts file and remove the entry for google plus. If it isn't there however, you can add one so you can override it pointing to 127.0.0.1 and it will work at school too, unless they block it differently.
I'll explain how the hosts file works, its location, and a quick way to edit it on your computer, be it a Windows or a Mac. If you're a Linux user, chances are you don't need help editing a random file.
Every computer running Windows, macOS, or Linux has its hosts file. By default, this file is not in effect. It's there, but it doesn't do anything other than contain brief information on what it is and how to use it.
This process is necessary because computers only understand numbers, while humans are bad at remembering them. In a way, the domain name is the vanity moniker of a website's IP address. "DongKnowsTech" is much easier to remember than 73.124.79.110 or any other random string of numbers.
In many ways, a DNS server is similar to the once-commonplace telephone directory service, where you only need to remember a person's name, not their phone number. It's the first thing that must happen before a connection can be established.
This particular example entry binds www.facebook.com to the IP of the localhost, the computer itself, and in effect, blocks the computer's access to Facebook. Specifically, when you go to facebook.com, you'll get a message that the website doesn't exist or is unavailable.
The way it works, every time you want to reach a domain, such as entering it on a browser, the computer will check its hosts file for the mapping, and if the domain is manually mapped, it'll use that and no longer query a DNS server for the domain.
The unrestricted downloads are small "thank yous" to those who have supported us and are NOT meant to be subscription coercion. In any case, please download once and save the file locally for future use.
By the way, if I know about the hosts file, which you now do, too, we have to assume that the bad guys also know it. As a result, keep in mind that the file can be used for no-good purposes, considering how relatively easy it can be altered.
Using the hosts file is the sure way to control the binding of a domain to an IP address in a computer, and all that applies. Consequently, among other things, it's a straightforward and effective method to block certain websites from the machine.
Entering one domain at a time into the hosts file can be time-consuming. For this reason, there are a lot of pre-made hosts files, where somebody has compiled a long list of blocked domains, available for download.
However, be careful with these pre-packaged hosts files. They tend to include hundreds of domains to block all kinds of things, including legit services. That's not to mention there can be malicious entries.
Many domains are interconnected, and blocking one can make others not work properly. Blocking a wrong domain can also cause important functions of a computer, such as auto-updates or security/integrity checks, to stop working.
On top of that, a large hosts file can also adversely affect performance. It's a good idea to keep its size below a few hundred kilobytes. Generally, you should only use entries that you're aware of in the hosts file.
It's a good practice to be mindful of this file and use a blank (default) hosts file when troubleshooting your connection, or connection-related issues. When in doubt, you can safely disable the file by renaming, deleting, or moving it away from the default location.
Sorry I forgot to mention that I just want to block sharing of audio, video and documents through WhatsApp web and/or whatsapp desktop software. The user should be able to use the chat feature otherwise.
You can support the site directly via donations or subscriptions.
? Thank you!Access PointsAiMeshAsusBackupBestBroadbandCable ModemsCommScopeDecoEVGamingLinksysMatchupsMeshMicronMulti-GigabitNASNetgearNetworkingNighthawkOrbiOverviewPoEPortable DrivesRoutersSamsungSecuritySFP and SFP+SSDStorageSwitchesSynologyTop PicksTP-LinkUbiquitiUpgradeWDWi-FiWi-Fi 5Wi-Fi 6Wi-Fi 6EWi-Fi 7WindowsZenWiFiZyXel
How this works: you are now telling your Mac to send requests for MySpace.com (or whatever site you listed) to 127.0.0.1, your local machine. This completely blocks the MySpace.com address from being loaded in any web browser. (Note that if someone is savvy enough though they could access the blocked site through a web proxy). If you really want to be crafty and have Personal Web Sharing enabled, you could put up a simple webpage for people to see when they try to access the blocked sites.
I have a macbook, 10.7.8 OS. Do you have a fix for this annoying regular occurrence of sales sites, namely mackeeper, but there are others from jumping onto my internet connection when using safari? When this happens, I have to exit safari and reenter wasting time getting back to the same place.
What I have done is spotlight my files for a zeobit or mackeeper entry, open up this file and send it to trash, then clearing the trash. But i still get the damn mackeeper daily and then go into the safari preferences, clear all the caches and cookies, but within minutes, the preferences can have another huge batch to get rid off. The clearing of the preferences helps me reuse the internet but only for a while.
Details :
I blocked one website using sudo command. I just wanted to check how this blocking works. It worked great for blocking websites according to the procedure stated above.
and now I want to unblock it. But I could not.
I tried using deleting and saving the host file using pico cmd. It gets saved but the website remains unblocked.
Editing the hosts file has been done and cache flushed, but Mac OS 10.4.11 seems to ignore the hosts file, and the undesirable pop-unders still occur. How do we force the OS to abide by our hosts file instructions?
Ive been using .
It uses a better procedure than blocking social media sites because it only monitors websites during production hours. People/Employees still have the option to use it for a breather or during breaks really . Sometimes they use it for work too .
Jon, Susan, and Jen:
Make sure you flush your cache after you save the hosts file.
For Mac OS X 10.5 and above, this can be done by opening Terminal and entering the following:
sudo dscacheutil -flushcache
I then re-started my computer, only to find that safari version 4 public beta and firefox I can still enter the websites. I know my command lines are saved as when I re-enter the Terminal my added lines immediately appear. I would really appreciate it if you could help.
@Jill and girlfriend on myspace to much guy, to unblock all you have to do is go back into the command and delete the urls you put in and also the ip address to your computer and safe the file again and that worked for me, just double check if you remove access to a site or add it back to see if it worked i have a mac with file vault on and it did not work for me i tested it on another account with out it on and it worked fine.
93ddb68554