256 Kilobytes

How to block certain websites on your computer

Articles in Operating Systems | By Hash Brown

Published

Boost productivity or simply block advertising tools, whatever you want homie.

463 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:

C:\WINDOWS\system32\drivers\etc

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:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     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:

Mission complete.

Users Who Have Downloaded More RAM:
August R. Garcia (10 months ago)
🐏 ⨉ 1
Posted by Hash Brown 10 months ago 🕓 Posted at 11 December, 2019 08:44 AM PST

Read More:
Windows
Profile Photo - Defaultjohnbrown2547Banned

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.

Download more RAM. 🐏 ⨉ 0Posted by johnbrown2547 10 months ago

Edit History

• [2019-12-27 2:22 PST] johnbrown2547 (10 months ago)
🕓 Posted at 27 December, 2019 02:22 AM PST

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

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.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

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.

Register an Account