These days there are a lot of reasons we may want to block a website. In some cases, it’s because the site has questionable or objectionable content that might pose a harm to people such as children. Or sometimes it’s our bad habits that keep us from meaningful work. In this tutorial, I’ll show how to block access to a website without a browser extension.
Why Block Site Access
Most of us would agree that the Internet has its share of scary places. Some sites are rabbit holes I don’t want anyone to venture down. Aside from parental controls and security, another reason is time. Many sites can be addicting and unproductive. Some categories people have mentioned include:
- Social networking sites
- Auctions sites
- Political sites
- Adult content sites
- Explicit content sites
- Sports sites
- Finance sites
- News sites
The suggestions below on how to block a website are easy to implement. Each has its advantages and disadvantages. Most of these solutions are not browser dependant. This makes the solutions work regardless if you’re using Google Chrome, Firefox, Safari, or Microsoft Edge.
I also decided not to use any browser extensions. While there are some good ones out there, I prefer not to install extra stuff. Browser extensions do impact your computer’s performance. The other reason is there have been some copycat extensions that are malware. If you do decide to use an extension, please make sure you’ve thoroughly checked it out. Just because it is in a browser store, doesn’t mean it’s safe. I once downloaded a 2FA authenticator program that looked like it came from Microsoft.
Use OpenDNS to Block Categories or Websites
OpenDNS is a Cisco-owned company that provides free DNS servers. Typically, your internet service provider (ISP) provides your DNS. If you’re not familiar with DNS, it’s like the Internet’s phone book. Instead of typing in an IP address, you can type in a domain name.
I’ve been using the service for years but didn’t realize all the features they offered. One feature is the ability to block domains or groups of domains. Think of these like a category block.
The service appeals to me for several reasons. The first is that it’s a fast DNS service. They were immune to various DNS security issues that took place over the years. Secondly, the settings can apply to a specific computer or your network. Lastly, the service is free.
If you create an account with the service, you can gain access to more features. If you need to restrict access, OpenDNS has over 50 category filters covering the usual suspects. Moreover, you can choose to block specific websites. For a small yearly fee, there are enhanced services you can get such as faster DNS and support.
When a browser goes to a blocked domain, an error message will display.
Check Your Router Settings
Another way to block websites is with your network router. A router is a piece of hardware that directs traffic between your network and the internet. Most popular routers offer some sort of “parental control” or “internet access policy” that includes website blocking. The key for many people may be remembering how to access the administrative panel. Usually, you can find this information from the manufacturer’s website.
The screen snap above represents the configuration panel on my router. In this case, I’m allowing access to use the internet all the time except for the eBay domain that I’ve blocked. These options differ between manufacturers. Like OpenDNS, the router may offer you the best option as the changes can apply throughout your network or to a specific PC or MAC address.
Some systems also allow you to regulate Internet access based on the day of the week or hour.
Ask Your Internet Service Provider
These days many people don’t own their equipment, such as routers or modems. Instead, they lease the hardware from their service provider. Most providers offer some sort of parental control or content control configuration. These vary considerably by provider but typically allow one or more of the following features:
- Block internet access by device
- Block sites by content filters
- Block site by time of day
- Block site by domain
- Set screen time limits
- Create user profiles
- Create a custom block list
The downside is the documentation. My experience with ISP documentation has been that the content is geared toward network engineers and not customers. Sadly, this means you may have to call or contact technical support.
Use the Hosts File
This approach can be as easy or complicated as you like. I wrote a hosts files tutorial several years ago. The idea is that you redirect your web browser to go to another IP address, such as your local machine, rather than the intended site. Usually, the fix requires you to add a line to your computer’s Hosts file using a text editor. The process is similar if you use Mac OS.
In the example above, I added a line for YouTube.com at the bottom. If I now try to access the site with my browser, I’ll get an error message similar to the one below. The message is a bit cryptic and probably wouldn’t make anyone look at your hosts file. However, one line did allow me to block access to a website.
These error messages will differ based on your browser. Here’s another example.
Hosts File Limitations
While using the hosts file is easy, there are limitations:
- You need to have administrative rights to the Hosts file.
- The block will only work for that specific computer.
- You need to flush your DNS after making changes.
- You need to preface the domains with “www”.
Microsoft & Apple Family Options
Both Microsoft Windows and Mac OS have parental control options for families. While these are great for families, they won’t help you or your habits. For example, I can’t set up a content filter for myself. They also require you to set up accounts for family members. Content filtering is just one subset of what these systems offer, so it’s worth checking them out. One disadvantage is Microsoft only wants you to use Microsoft Edge.
These suggestions aren’t the only ways to block access to a website. And remember that people will try to get around any measures you put in place. It shouldn’t come as a surprise if someone believes a site is so valuable.