PDF download Download Article
Easy ways to block and unblock any website on your Mac
PDF download Download Article

Blocking certain websites can keep you productive during the workday or minimize the chance of your child finding adult content. You can create a website "blacklist" for your Mac with the built-in Screen Time options, in Terminal, using third-party browser extensions or apps, or even on your router. If you’re struggling to access certain websites, we’ll also teach you how to unblock them.

Easy Ways to Block or Unblock Websites on Mac

The easiest way to block websites on a Mac is with Screen Time, but you can also do it with third-party apps or even in Terminal. If you can't get to a website, check your Screen Time settings or try using a VPN or proxy to get around regional blocks.

Section 1 of 5:

Blocking and Unblocking in Screen Time

PDF download Download Article
  1. It’s the Apple logo in the menu bar at the top of your screen. This displays a drop-down menu.
  2. It's in the drop-down menu that appears when you click the Apple icon.
    • If you’re using a pre-Ventura version of macOS, this will be called System Preferences .
    Advertisement
  3. It's an icon that resembles an hourglass. In Monterey or later, you’ll find this in the sidebar on the left side of the System Settings/Preferences menu. In earlier macOS versions, you’ll see it in the main System Preferences window.
    • If you are using an older version of macOS (pre-Catalina), click Parental Controls instead. You may need to set up a new account with parental controls.
  4. If you are a member of a family-sharing group, you can click the pop-up menu in the sidebar to the left and select the family member you want to restrict from accessing certain websites.
    • If you have an older macOS version, click the lock icon in the lower left corner and enter your user password. Then click the user you want to restrict.
    • Skip this step if you’re trying to restrict websites on your own account.
  5. In Ventura and later, it’s in the main Screen Time window on the right. In older versions of macOS (Monterey and earlier), it's at the bottom of the sidebar menu to the left.
  6. In earlier macOS versions, click Turn On instead. It's in the upper-right corner. This enables Content and Privacy restrictions.
    • If you want to disable all web and content restrictions, click the toggle switch or the Turn Off button to turn content restrictions off.
  7. In Sonoma and later, it’s the first item in the menu under the Content & Privacy header after you activate the toggle switch. In earlier versions of macOS, click Content Restrictions or the Content tab at the top of the window.
    • On pre-Catalina versions of macOS, click the Web tab at the top of the Parental Controls menu.
  8. Depending on your version of macOS, you will either find this option in a dropdown menu or in a series of radio buttons next to the Web Content or Access to Web Content header.
    • Alternatively, you can select Allowed Websites Only . This will block all websites except for the ones you allow.
  9. This option will appear once you’ve selected either Limit Adult Websites or Allowed Websites Only . This allows you to customize what sites you want to allow and restrict.
  10. It's the box at the bottom. This is where you can enter specific websites you want to block.
    • Alternatively, if you block all but allowed websites, you can enter the websites you want to allow by clicking the "+" button below the "Allow" box.
  11. Enter the web address for the website you want to block next to "URL." Then click Done or OK , depending on your version of macOS.
    • If you want to remove a website from the restricted website, click the website you want to remove and click the " - " button below the box.
  12. This saves your list of allowed and restricted websites. Any websites in the "Restricted" list will be blocked.
    • In some versions of macOS, click OK instead.
  13. To remove your restrictions, select Unrestricted Access from the Access to Web Content menu and click Done . You can also:
    • Add specific websites to the Allow box or remove them from the Restricted box to unblock them.
    • Toggle off Content & Privacy in the main Content & Privacy menu of Screen Time to turn off all restrictions.
  14. Advertisement
Section 2 of 5:

Unblocking with a VPN or Proxy

PDF download Download Article
  1. Install a VPN to get around regional blocks. If a website is blocked in your area, you can sometimes use a VPN (Virtual Private Network) to fake your location. [1] Download a VPN from the App Store or the web and follow the configuration instructions to get started.
    • If you prefer, you can set up your VPN manually .
    • Once the VPN is set up, choose a server in a location where the website you’re trying to reach is unrestricted.
  2. If a website you want to view is blocked in your region (or on your workplace, school, or home network), you might be able to get around it with a public web proxy . This is a good option when you’re using a public Mac or one where you don’t have admin privileges, so you can’t install a VPN. To do it:
    • Do a search for public web proxies.
    • Select a proxy from the results. If it’s blocked, try another one.
    • Paste the URL for the website you’re trying to access into the text box on the proxy site and select a region for your proxy server. Click Go .
    • Just keep in mind that proxies aren’t as secure as VPNs, so it’s possible someone could see information you’re sending or receiving.
  3. You can also use your browser to unblock websites. Private browsers like Tor, Brave, and Avast Secure Browser add extra layers of encryption and can disguise your IP address, allowing you to get around blocks in your region or on your local network. If you can’t or would rather not switch to a private browser, try installing a proxy or VPN extension in your regular browser.
    • In Firefox:
      • Click the menu in the top right corner of the browser and select Add-ons and themes .
      • Search for proxy or vpn in the search box next to Find more add-ons at the top of the page.
      • Install an add-on such as FoxyProxy Standard or Hoxx VPN Proxy .
    • In Chrome:
      • Go to ⋮ > Extensions > Visit Chrome Web Store .
      • In the Search extensions and themes box, search for proxy or vpn .
      • Install an extension such as Proxy SwitchySharp or Urban VPN Proxy .
  4. Safari has its own built-in proxy capabilities. If you have access to a proxy server, you can manually configure Safari to route traffic through it so you can access blocked websites. To do it: [2]
    • With the Safari browser open, click Safari in the menu bar at the top of your screen, then select Settings… . Click the Advanced tab.
    • Next to “Proxies,” click Change Settings… . This will open your Mac’s proxy settings.
    • Toggle on the type of proxy you will be using (e.g., Secure web proxy ) and enter the server and port information.
    • Click OK when you’re done.
  5. Advertisement
Section 3 of 5:

Unblocking with Hacks and Workarounds

PDF download Download Article
  1. If you’re not able to use a proxy or VPN, you can try a few different hacks to get around blocks on websites. One easy one is to look at a cached version of the site , which may not be blocked on your network. Unfortunately, it’s no longer as easy to do this with Google as it used to be, but you can still do it a few different ways:
    • Use the Internet Archive’s WayBack Machine to browse older versions of websites.
    • Enter the URL of the website into the Google search bar with “cache:” in front of it. For example: cache: https://www.wikihow.com/Main-Page .
    • Use a special bookmarklet: [3]
      • Create a bookmark in your favorite browser called “Google Cache.”
      • Paste the following code into the URL field: javascript:location.href='https://webcache.googleusercontent.com/search?q=cache:'+document.location.href;
      • Go to a website and click this bookmarklet in your browser toolbar to view a cached version.
  2. This simple hack can sometimes trick your network into letting you visit blocked websites or domains. Feed the URL into a shortener such as Bitly or TinyURL . Paste the short URL into the address bar on your browser and try visiting the site that way.
  3. Try switching from https to http (or vice versa). Most websites have a secured and unsecured version. You can switch between them by changing the beginning of the URL from “https://” to “http://” (or the other way around).
    • While this might help you get around blocks sometimes, just be careful—unsecured websites aren’t the safest to use, especially if you need to enter information about yourself to use the site.
  4. If you just want to read what’s on the blocked page, this is a quick and easy workaround. Visit a free HTML to PDF converter, such as SodaPDF or WebtoPDF and paste in the URL. Then, click the convert button (it may be called something like Generate PDF or Convert ) to get a downloadable PDF with the contents of the blocked site.
    • The PDF should save to the Downloads folder on your Mac by default, or it might open in your browser.
  5. Advertisement
Section 4 of 5:

Blocking with Apps, Extensions, & Router Settings

PDF download Download Article
  1. Most web browsers have extensions that you can install, which allow you to block specific websites. You can install extensions that block websites on Google Chrome , Safari , and Firefox . Access the store for that web browser and search for site blocker extensions.
    • You can access the Google Chrome store at https://chrome.google.com/webstore/category/extensions . You can access the Firefox extension store by typing "about:addons" in the address bar. You can download extensions for Safari in the App Store.
    • Some extensions you can use to block websites include "BlockSite," "Stay Focused," "Simple Blocker," and more.
    • Be careful of apps with low ratings or too few reviews to judge accurately. Untrustworthy extensions may install malware on your computer.
    • This will only block websites on the browser the extension is installed on.
    • Once the extension is installed, you can go into the settings and add or remove websites from your block list.
  2. In addition to web browser extensions, you can also download apps that block content on your computer. There are plenty of apps that block websites for both parental control and productivity purposes. These apps include Net Nanny, Freedom, Cold Turkey Blocker, SelfControl, Focus, and more.
    • Some of these apps block websites completely, while others allow you to block certain sites for a specific period of time.
    • You will be able to block and unblock websites from within the app.
  3. Blocking sites on your router will prevent any device using the wireless network from accessing those sites. To access your router , you will need to find your IP address and enter it in your web browser. From there, the procedure will vary depending on what kind of router you have.
    • To find your IP address, go to System Settings (or Preferences) Network Wi-Fi . In Ventura or later, click Details… next to your network. You can find the router IP address in the main tab or in the TCP/IP tab.
      • For earlier versions of macOS, click Advanced , then click the TCP/IP tab.
    • Copy the IP address listed after "Router" or "IPv4" and paste it into your browser's address bar. This should take you to your router settings.
    • Enter the username and password to log in to your router. If you have never set these, look up the default password for that router model. (User "admin" and password "password" are common defaults.)
    • Browse the router settings for site-blocking options. Each router brand has a different set of options, but most allow you to block sites in an area labeled "Access," "Content," "Rules," "Blocked Domains," or something similar.
    • Add any websites you want to block. There will most likely be an option to click to add websites. Click this option and then add the website URL you want to block. Remove websites from the list to unblock them.
  4. Advertisement
Section 5 of 5:

Blocking Sites with the Hosts File

PDF download Download Article
  1. To do so, click the
    Mac Spotlight
    magnifying glass icon in the upper-right corner of your Mac’s screen. Type "Terminal" in the search bar. Then click the Terminal app in the search results.
    • This method does not have a 100% success rate and is not too difficult to bypass. It's a quick way to block a website on your personal computer for productivity reasons. While not recommended as the only way to block other users' access, you can try it alongside another method for greater effect.
  2. If you make a mistake while editing the hosts file, you could block all access to the internet. Creating a backup copy allows you to return to the original version if this happens. This is as simple as a single command:
    • To back up the host file, type sudo /bin/cp /etc/hosts /etc/hosts-original in the Terminal exactly as it appears. Then press Return .
  3. The Terminal should prompt you for your password. Type it in and press Return . You won’t see your cursor moving as you type in the password.
  4. To do so, type sudo nano /etc/hosts and press Return . This command will open your Mac's hosts file in TextEdit.
    • Alternatively, you can edit the hosts file in the main Terminal window using the command sudo nano -e /etc/hosts .
    • Enter your administrator password again if prompted to do so.
  5. This line will be close to the bottom of the Host Database text. Use your arrow keys to move your cursor to the end of the line and press Return to create a new line.
    • Don’t edit any other text that comes before this line.
  6. On your new line, type out 127.0.0.1 . Hit tab to create a space.
  7. Type the URL you would like to block. Do not include "http://." For example, if you want to block access to Facebook, the line should read .
    • Do not copy-paste from another document. This can introduce invisible characters that prevent the text from working.
  8. To do so, press Return and begin a new line with 127.0.0.1 . Press tab and follow it with another URL you want to block. You may block any number of websites, but you must start each new line with "127.0.0.1".
    • In theory, you can include multiple URLs on one line (entering the IP address only once), up to a maximum of 255 characters. [4] However, this may not work on all versions of macOS. [5]
  9. Close or quit the TextEdit dialog box when you are done, then confirm that you want to save the TextEdit file when prompted. (In some cases, the file may save automatically.)
    • If editing in the main Terminal window, press Control + O to save, then Control + X to close the file.
  10. This will clear the cache so your browser is sure to check the updated hosts file immediately. The websites you listed should now be blocked on all browsers. The correct command for doing this depends on your version of macOS.
    • If you’re using Sonoma, Ventura, or Monterey, type or paste in the command sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder , then press return or enter .
    • For earlier versions of macOS, check out our guide to flushing your cache .
    • You may restart your computer instead to get the same effect. In many cases, the sites will be blocked even without this step.
  11. If you can still access one of the websites, your browser may be accessing a different subdomain, accessing the site via IPv6, or bypassing your hosts file for that site. You can solve the first two problems by adding more lines to your hosts file:
    • 127.0.0.1 (URL) without the "www"
    • 127.0.0.1 m.(URL) will usually block the mobile version of the site
    • 127.0.0.1 login.(URL) or apps.(URL) are a couple common variations of home pages. Visit the website and check your address bar for the exact variation.
    • Entering "fe80::1%lo0 (URL)" blocks IPv6 access to the site. Most sites do not automatically connect you via IPv6, but Facebook is a notable exception.
    • If none of these variations work, there is probably no hosts file workaround. Try one of the other block methods on this page.
  12. Open your hosts file again and delete the entry for the URL you would like to unblock. Save, quit, and flush the cache as described above to push through the change.
    • To undo all changes and restore from your backup, enter sudo nano /etc/hosts-original in Terminal. Press Control + O , delete the "-original" in the name, and confirm the save.
    • You can also add a # before the line containing the website you want to unblock to indicate that the line should not be read. That way, you can always keep the line and delete the # in case you want to easily block it again.
      • For example, you would write #127.0.0.1 www.facebook.com to unblock Facebook.
  13. Advertisement

Expert Q&A

Search
Add New Question
  • Question
    How do I block a website on Safari?
    Yaffet Meshesha
    Computer Specialist
    Yaffet Meshesha is a Computer Specialist and the Founder of Techy, a full-service computer pickup, repair, and delivery service. With over eight years of experience, Yaffet specializes in computer repairs and technical support. Techy has been featured on TechCrunch and Time.
    Computer Specialist
    Expert Answer
    Each browser will have it's own security and privacy settings where you can add sites you want to block or unblock.
  • Question
    How do I use Parental Control without needing access to an Administrator account?
    Community Answer
    This can't be done. An Administrator account is required to change Parental Control settings.
  • Question
    Is there any way to do this without a password?
    Community Answer
    No. An Administrator account is required to change parental control settings.
See more answers
Ask a Question
      Advertisement

      Video

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!
      Advertisement

      About This Article

      Article Summary X

      1. Open System Preferences .
      2. Click the Screen Time icon.
      3. Click Content & Privacy .
      4. Click Turn on in the upper-right corner.
      5. Select Limit adult websites .
      6. Click Customize .
      7. Click + below the "Restricted" box.
      8. Enter the website you want to block and click Ok .
      9. Click Ok .

      Did this summary help you?
      Thanks to all authors for creating a page that has been read 1,108,769 times.

      Reader Success Stories

      • Vivian West

        Dec 30, 2018

        "This was so so helpful! Thank you immensely, wikiHow, you guys are awesome. "
        Rated this article:
      Share your story

      Is this article up to date?

      Advertisement