Monday, August 9, 2021

Making the internet load faster on slower connections

You can use your hosts file to block sites you dont want to go to. You can also use it to block ads and trackers, which makes using the internet safer and also makes things load quicker.

Think of a hosts file like your computers local phone book for looking up names, the urls. So facebook.com has it's own number called an ip address. If you want to block a url just refer to localhost in your hosts file. If you want to find out more Google "what is a hosts file?" I dont think there's not much point in me going into detail about it here. Generally localhost on most computers is 127.0.0.1

There are pre made hosts files with a bunch of urls in there refering to localhost so if your computer asks for that site, it'll just 404. To test that it's working put in a url at the end that you really dont care about at the end of the file like this:

127.0.0.1 facebook.com

There's a really good hosts file you can use at https://someonewhocares.org/hosts/ how to install the hosts file in your computer is all on that site.

Though just to make sure nothing goes wrong you might want to flush the dns cache. (since the thing is going and finding the urls is part of the dns, if you dont want it to glitch, flush the dns cache so it looks for everything in the hosts file first. Some old entries may be there.

You can do this in Windows by holding the windows key and hitting D typing cmd and hit enter then at the prompt that shows up type ipconfig /flushdns and hit enter

On ubuntu press ctrl + alt + t and the prompt will open then type sudo systemd-resolve --flush-caches and hit enter.

You'll probably notice things loading a lot quicker, since it's not loading as much bullshit in the background.

No comments:

Post a Comment