Your IP:Unknown

·

Your Status: Unknown

Skip to main content


How to block a website on any device or browser

The internet is an ocean of websites. While some of them are beneficial, others have no use to you, or even worse, can even cause harm. Luckily, you can block some of those websites with just a few clicks on your browser or device. Here’s how.

Oct 7, 2024

9 min read

How to block a website

How to block a website on various devices

For safe browsing, you can block websites either by using your browser or your device’s settings. For now, let’s focus on the latter. Here are the ways to block specific websites on your device, regardless of the browser you use.

How to block a website on Windows

If you’re wondering how to block websites on Windows, you need to follow these steps:

  1. 1.

    Go to “File Explorer” and find the “C:\Windows\System32\drivers\etc” directory. There, look for the hosts file.

    How to block a website on Windows: Step 1
  2. 2.

    Right-click on the hosts file and open it with an appropriate text editor (such as Notepad). Make sure you have administrative privileges.

    How to block a website on Windows: Step 2
  3. 3.

    To block a specific website, add “127.0.0.1” to the end of the file, type in the URL of the site you want to block, and press “Enter.”

    How to block a website on Windows: Step 3
  4. 4.

    Save the changes to the hosts file and close the text editor.

    How to block a website on Windows: Step 4
  5. 5.

    Finally, flush the DNS cache by opening Command Prompt with administrative privileges and entering the command “ipconfig /flushdns.” The changes should take place immediately after you complete this step.

    How to block a website on Windows: Step 5

How to block a website on Mac

For Mac users, the process of blocking websites is similar to Windows. All you need to do is:

  1. 1.

    Open the Terminal app on your Mac (“Applications” > “Utilities” folder or press “Command” + “Space” and type "Terminal" in the “Spotlight” menu).

    How to block a website on Mac: Step 1
  2. 2.

    Once in the Terminal window, type the “sudo nano /etc/hosts” command and press “Return.” Then enter your administrator password.

    How to block a website on Mac: Step 2
  3. 3.

    Navigate to the bottom (use arrow keys). To block a specific website, type “127.0.0.1” then enter the URL you want to block next to the inputted line, and press “Return.”

  4. 4.

    Press “Command” + O and then “Command” + X to save changes and exit the nano text editor.

  5. 5.

    In the “Terminal” window, type the command “sudo dscacheutil -flushcache” and press “Return.” This will flush the DNS and enable the changes immediately.

    How to block a website on Mac: Step 5

How to block a website on Android

If you’re not sure how to block websites on Android, it has to do with parental permissions available in the phone’s settings. Here’s how to find them and block unwanted websites from an Android phone:

  1. 1.

    Navigate to your Android’s “Settings” menu.

  2. 2.

    Tap "Digital wellbeing & parental controls."

    How to block a website on Android: Step 2
  3. 3.

    Find "Parental controls" and tap “Setup parental controls.”

    How to block a website on Android: Step 3
  4. 4.

    Tap "Content restrictions." This section will allow you to edit site restrictions.

    How to block a website on Android: Step 4
  5. 5.

    Tap “Google Chrome.”

    How to block a website on Android: Step 5
  6. 6.

    Tap “Try to block explicit sites” and then tap on “blocked sites.”

    How to block a website on Android: Step 6
  7. 7.

    Tap “Add a website.”

    How to block a website on Android: Step 7
  8. 8.

    Type in the URL you want to block and tap “Add.” The blocked site should appear in the “blocked sites” section.

    How to block a website on Android: Step 8
    How to block a website on Android: Step 8

How to block a website on iPhone

Blocking unwanted websites on the iPhone is also a piece of cake. All you have to do is:

  1. 1.

    Go to your iPhone’s settings.

    How to block a website on iPhone: Step 1
  2. 2.

    Find "Screen time" at the bottom of the settings menu.

    How to block a website on iPhone: Step 2
  3. 3.

    Tap "Content & privacy restrictions" and turn them on.

    How to block a website on iPhone: Step 3
  4. 4.

    In the same menu, find "Store, web, Siri & game center content." Tap on it and select "Web content."

    How to block a website on iPhone: Step 4
    How to block a website on iPhone: Step 4
  5. 5.

    In “Web content,” enable the restrictions you want to enforce, for example "Limit adult websites" or "Only approved websites." "Limit adult websites" option blocks access to adult content, while "Only approved websites" allows manually adding websites to the list of unwanted websites.

    How to block a website on iPhone: Step 5
  6. 6.

    If you choose "Limit adult websites," tap on "Add website" under the "Never allow" section, and enter the URL you want to block. Once you’ve finished, tap "Done."

    How to block a website on iPhone: Step 6
    How to block a website on iPhone: Step 6
  7. 7.

    If you choose "Only approved websites," tap on "Add website" under the "Never allow" section, and enter the URL you want to block. Once you’ve finished, tap "Done."

    How to block a website on iPhone: Step 7
    How to block a website on iPhone: Step 7

How to block a website on iPad

Blocking a website on an iPad is the same as blocking the website on an iPhone. To block unwanted websites on your tablet:

  1. 1.Open the “Settings” app, and then find “Screen time.”
  2. 2.Find “Content & privacy restrictions” and enter your passcode.
  3. 3.Tap “Store, web, Siri & game center content.”
  4. 4.Tap “Web content,” then tap “Limit adult websites” or “Only approved websites.”
  5. 5.If you choose the adult website blocking, tap on "Add website" under the "Never allow" section, and enter the URL you want to block. Once you’ve finished, tap "Done."
  6. 6.If you choose "Only approved websites," tap on "Add website" under the "Never allow" section, and enter the URL you want to block. Once you’ve finished, tap "Done."

How to block a website on different browsers

You have at least three ways of blocking unwanted websites on your browser, depending on which one you use. You can either use your browser’s URL blocker (if you’re using a browser such as Microsoft Edge), download a browser extension, or use a third-party app.

How to block a website on Google Chrome

Excuse us, did we say “three ways”? Well, actually, there are even more ways to block websites on Google Chrome. But let’s focus on the most popular one — blocking websites using Chrome browser extensions. This is by far the quickest and easiest way to block unwanted websites on Chrome. All you have to do is:

  1. 1.Go to the Chrome browser web store.
  2. 2.Find an extension that blocks websites (for an easier search, you can just type “website block” in the search bar).
  3. 3.Find the extension that best suits your needs and download it by clicking “Add to Chrome.”
  4. 4.After installing, click on the extension in your browser toolbar and open it.
  5. 5.Follow the extension’s instructions (type in URLs or similar) to block unwanted websites.

You can also use Google Family Link or your router to block unwanted websites on the Chrome browser. Blocking websites via your router also blocks them for all devices that connect to it, regardless of the browser you’re using.

How to block a website on Safari

The easiest way to block websites on Safari is by using the browser’s built-in restriction settings. All you have to do is:

  1. 1.

    Find the Apple icon in the top-left corner of your screen and select "System settings" from the dropdown menu.

    How to block a website on Safari: Step 1
  2. 2.

    Find “Screen time,” on the left side of the window, click on it, and toggle the switch on.

    How to block a website on Safari: Step 2
  3. 3.

    After toggling the “Screen time” switch, proceed by finding “Content & privacy” in the same window and switching it on.

    How to block a website on Safari: Step 3
  4. 4.

    Click on “Content restrictions” and find “Access to web content.” Upon clicking on it, select “Limit adult websites.”

    How to block a website on Safari: Step 4
  5. 5.

    Then, click the “Customize” button, and under the “Restricted” section, click the “+” button. Type in the URLs you want to block and click “Done” once finished.

    How to block a website on Safari: Step 5
  6. 6.

    To implement all changes, click “Done” once more.

How to block a website on Mozilla Firefox

While you can use browser extensions and hosts file modifications (see the “How to block websites on Windows/Mac” sections above) to block websites on the Mozilla Firefox browser, you can also try the browser’s built-in tool for website blocking. Here’s how:

  1. 1.

    In the Firefox settings menu, navigate to the “Privacy & security” panel.

    How to block a website on Mozilla Firefox: Step 1
  2. 2.

    Find the “Cookies and site data” section.

    How to block a website on Mozilla Firefox: Step 2
  3. 3.

    Click “Manage exceptions” and type the URL of the website you want blocked.

    How to block a website on Mozilla Firefox: Step 3
  4. 4.

    Once you finish typing the URL, click “Block” to add it to the blocked website list. After you’re done, click “Save changes” at the bottom right corner to finalize the process.

    How to block a website on Mozilla Firefox: Step 4

How to block a website on Opera

To block websites on Opera, you can use add-ons or hosts file configuration (see the “How to block websites on Windows/Mac” sections above), or you can set up filters that will block access to certain websites. Website filtering is more of an indirect way to block unwanted websites, and can be achieved by doing the following:

  1. 1.

    Go to “Settings” (or “Preferences” on macOS).

    How to block a website on Opera: Step 1
  2. 2.

    Click on “Privacy & security.”

    How to block a website on Opera: Step 2
  3. 3.

    Enable “Block ads and surf the web up to three times faster” feature.

    How to block a website on Opera: Step 3
  4. 4.

    Click on “Manage lists” and then “Custom lists” to add custom filter lists that block specific websites. Then type in the websites you want to block, and save changes by clicking “Add.”

    How to block a website on Opera: Step 4

How to block a website on Microsoft Edge

To block a website on Microsoft Edge, you can use a built-in browser tool that works by following these steps:

  1. 1.

    Open the browser’s settings and find “Family safety.”

    How to block a website on Microsoft Edge: Step 1
  2. 2.

    The page will navigate you to Microsoft’s “Family safety” suite. There, click on the three little dots in your child’s Microsoft account.

    How to block a website on Microsoft Edge: Step 2
  3. 3.

    Click on “Edge.”

    How to block a website on Microsoft Edge: Step 3
  4. 4.

    Scroll down until you see the “Blocked sites” option.

    How to block a website on Microsoft Edge: Step 4
  5. 5.

    Type in the URL of the website you want to block and click “+” to add it to the list.

    How to block a website on Microsoft Edge: Step 5
    How to block a website on Microsoft Edge: Step 5

Remember, you must be logged in to your Windows account to be able to access your content restriction settings.

Like what you’re reading?

Get the latest stories and announcements from NordVPN

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

We won’t spam and you will always have the choice to unsubscribe

FAQ

Also available in: Deutsch.


author Lukas T png

Lukas Tamašiūnas

Lukas Tamašiūnas is a content creator with an interest in the latest developments in the cybersecurity industry. He follows his curiosity to discover and share practical knowledge about online safety.