How to Block a Website in 2024

Step-by-step guide on blocking websites for teachers, guardians and parents to keep students and children protected from harmful and distracting online content.

July 2, 2024

7 minutes
How to Block a Website in 2024

How to Block a Website in 2024: A Guide for Educators, Parents, and Guardians

Our information age has made access to useful information so easy that sometimes all you need is your mobile and the internet to find out—if you’re curious—how to block YouTube or how to block certain YouTube channels. This ease of access has come with a price, however, as the internet is not only rich with useful and factual information but also with distracting and harmful websites that parents and teachers find the need to block in order to protect students and children, creating a safer and more focused online environment. This is what our guide aims to help you with by walking you through the steps of blocking websites through different methods.

Why Blocking Websites is Important?

Blocking websites can help protect children from inappropriate content, reduce distractions during study time, and prevent access to malicious sites. Here are a few key reasons why you might want to block websites:

  • Protecting Children - Many websites contain content that is not suitable for children, such as violence, explicit material, or harmful misinformation.
  • Reducing Distractions - Social media, gaming, and entertainment sites can be major distractions during homework or class time when students are supposed to focus with the task at hand.
  • Preventing Malware - Blocking suspicious or unknown websites can protect devices from malware and other security threats that children are not aware of.

How to Block Websites on Different Web Browsers

Blocking websites can be done directly through web browsers by using built-in settings or extensions. Here’s how you can block websites on Chrome, Safari, and Brave browsers. Please be aware that some of these can be a little technical but you can still do it on your own while others may require you to check your level of access and consult your IT (if you’re in school or at work).

How to Block Websites on Google Chrome

Using Built-In Settings

Google Chrome's desktop version doesn't have a built-in feature to block websites directly, but you can use the following method on Windows devices:

  • Modify the Hosts File:
    • Open the Windows "Hosts" file, usually located at C:\Windows\System32\drivers\etc\hosts. On Mac/Linux, the file is at /etc/hosts.
    • Add the line "" to the file, replacing "" with the URL you want to block.
    • Save the hosts file and exit. This will redirect the blocked website to your local machine, effectively preventing access. 

The hosts file method blocks the website across all browsers and applications on the device, not just Chrome. It's a more comprehensive way to block websites compared to the Chrome settings.

Using Extensions

Chrome offers various extensions to block websites like BlockSite.

  1. Go to the Chrome Web Store and search for "BlockSite".
  2. Click "Add to Chrome" and then "Add Extension".
  3. After installation, go to the BlockSite settings and add the websites you want to block.

The free version has a limit to the number of sites you can block, while the paid version has no limits.

How to Block Websites on Safari

To block websites in Safari, you can use the built-in Screen Time feature on Mac. Here's how you can do it:

  1. Click the Apple icon in the top-left corner of your screen and select "System Preferences".
  2. Choose "Screen Time".
  3. Click on "Content and Privacy" in the left sidebar.
  4. Turn on the feature by clicking "Turn On" (if not already enabled).
  5. Select "Limit Adult Websites" and then click "Customize".
  6. In the "Restricted" section, click the plus symbol.
  7. Add the URL of the website you want to block and click "Ok".

This method allows you to restrict access to specific websites without the need for extensions or third-party apps, making it a convenient way to maintain a controlled online environment for your students and children

How to Block Websites on Brave

On Brave you can use extensions similar to Chrome.

Using Extensions:

  1. Open the Brave Browser and go to the Chrome Web Store.
  2. Search for and install a website blocker extension like "BlockSite."
  3. Configure the extension to block the desired websites.

How to Block Websites at the Network Level

To block websites at the network level, you can use various methods depending on your operating system and router model and, important to remember, you may want to consider asking the help of an IT or tech support for this. Here are some steps to follow:


  • Using the Route Command:
    • Open an elevated command prompt.
    • Use the route print command to print the current routes and interface list.
    • Find the desired interface and note its number.
    • Use the ipconfig command to find the default gateway of the interface.
    • Use the nslookup command to find the IP address of the target website.
    • Add a static route using the route command to force traffic to the website's IP address through the desired interface:
      route [-p] add <website IP address> mask <interface default gateway> if <interface number>
    • The -p option makes the change persistent across reboots.


  • Using Screen Time:
    • Go to System Preferences > Screen Time.
    • Click on "Content and Privacy" and turn on the feature.
    • Select "Limit Adult Websites" and then click "Customize".
    • In the "Restricted" section, click the plus symbol.
    • Add the URL of the website you want to block and click "Ok".


  • Using Router Settings:
    • Find your router's IP address (usually or
    • Log in to the router using the default username and password (usually admin for both).
    • Look for the "Block Sites" or "Access Control" option under "Security" or "Parental Controls".
    • Enter the domains you want to block.
    • Save the changes and restart the router.


  • Using Router Settings:
    • Follow the same steps as above for router settings.
    • Ensure that the router settings apply to all devices on the network, regardless of operating system.


  • Using Router Settings:
    • Ensure that the router settings are configured to block websites at the router level.
    • This method will block websites on all devices connected to the router, including phones.

Third-Party Apps

  • Using Apps:
    • Install apps like Kidslox or similar parental control software.
    • These apps can block websites and apps, set time limits, and provide reports on activity across multiple devices, including phones and tablets.

These methods allow you to block websites at the network level, ensuring that all devices connected to the network are restricted from accessing specific websites.

Frequently Asked Questions (FAQs) About Blocking Websites

Q: Can I block websites on my child’s smartphone?
A: Yes, both Android and iOS devices have built-in parental controls that allow you to block websites. Additionally, you can use third-party apps like Qustodio or Net Nanny for more comprehensive control.

Q: How do I unblock a website that I’ve previously blocked?
A: To unblock a website, simply reverse the steps you took to block it. For browser extensions, remove the website from the blocked list. For router settings, delete the website from the restrictions.

Q: Is it possible to block websites only during certain hours?
A: Yes, many parental control tools and router settings allow you to set time-based rules, blocking websites only during specific hours.

Fun Facts

Did you know? The first website ever created was, which went live on August 6, 1991.

Internet Trivia: As of 2023, the number of websites on the internet is estimated to be around 1.98 billion, with less than 200 million of them being active. This means that about 18% of websites are active, while 82% are inactive.

Thoughts of Blocking Websites

Blocking websites is crucial for parents and teachers to help ensure a safe and productive online environment for children. Whether you choose to block websites through browser settings, extensions, or at the network level, there are plenty of options available to suit your needs and level of access or technical know-how. By following the steps outlined in this guide, you can take better control of the content accessible to kids and create a safer digital environment for your family or students.

If you don’t want to block websites (or are unable to) but still want to have reasonable control over what you want your students or kids can access online on their device, give AstroSafe Browser a try!

Authors Bio

Article by

AstroSafe Content Team

The AstroSafe content team is committed to creating high-quality and child-friendly content that aims to help educators, parents, and guardians make it easier for students to learn important subjects for their development. Our team of writers have extensive experience at creating content for a multitude of subjects intended for children ages 12 and below.

You may also be interested in...