How to block certain websites on your computer
Boost productivity or simply block advertising tools, whatever you want homie.
346 views, 1 RAM, and 1 comment
There are a lot of browser extensions and tools that help people block websites and break habits that waste time, however for the mentally ill and fucking addicted that may not be good enough. Also they don't work 100%of the time on the websites you want to block, like twitter that seems to get around it with caching/web app of some sort...
These browser extensions and tools also have access to everything you do and may have unintended consequences of use from selling data to blocking websites when you actually need to see them.
There is a solution for the Windows Master Race though...
How to block websites with your hosts file
Your host file is a plaintext file that your PC uses to help cut down on DNS look ups, you can manually assign domain names to IP addresses and your PC won't go and look for the correct one through DNS.
Because of this we can simply assign websites that we want to block with our local IP, 127.0.0.1
This is a trick that many people use when pirating software. They will block the licensing servers through the host file so the software can never detect if it's stolen or not, you may have done this before.
In all modern versions of Windows your host file is located at:
Locate this and open in notepad or text editor of choice in administrator mode (inser reminder that MS Word is not a text editor).
The default host file looks something like this:
# Copyright (c) 1993-2009 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a '#' symbol. # # For example: # # 184.108.40.206 rhino.acme.com # source server # 220.127.116.11 x.acme.com # x client host # localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost # ::1 localhost
You will note that local host is defined as 127.0.0.1, so to block our websites we will be using this IP to assign to our domain names.
We do this by adding news likes below the current file content, it's important that we do not start these lines with #, this is simply commenting out our changes.
127.0.0.1 twitter.com 127.0.0.1 pornhub.com 127.0.0.1 reddit.com
This assigns our local IP to these domain names, I've obviously blocked twitter, pornhub and reddit as I am fucking addicted to social media scumbag coomer.
If you are a parent you may wish to block porn sites, this is a good method as your child is probably too stupid to realise. Bonus points for parents that build websites that would look like porn sites but with content that will scare your child (like your own sex tapes) and use this method to point all requests to pornhub.com to this weird mother and father porn site you made. Respect.
After this press save.
When you load your blocked domains you will see this:
- Capitalising on the new Google layout
- How to block certain websites on your computer
- [Noobie Content] Affiliate Marketing Inspiration - How much can you make from affiliate marketing?
- How a File Can be Zero Bytes
- AdBlock 101: How to detect and beat AdBlock - Stop losing money to content thieves and internet socialists
- Arch Linux vs. Ubuntu vs. Gentoo
- Twitch Installs Arch Linux | The Scariest Text-Based Adventure Game Ever
- Is Linux harder to use than Windows or MacOS? Or are you just a dirty casual?
- Bodhi Linux: What is it?
Some other content you may like:
I just passed this onto a colleague who was doing a little research on this topic. And he actually bought me lunch because I found it for him. So I should thank you for the free lunch I got.
Also, I am literally addicted to posting Best HP Printer Support Scam links. Pls ban. Thenkle.
Post a New Comment
Do you like having a good time?
Register an Account
Read Quality Articles
Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.
Argue with People on the Internet
Use your account to explain why people are wrong on the Internet forum.
Vandalize the Wiki
Or don't. I'm not your dad.
Ask and/or Answer Questions
If someone asks a terrible question, post a LMGTFY link.
Make Some Money
Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.