How to Block Websites on Mac

Use host files

How to Block Websites on Mac Picture 1

Open Spotlight. Click the magnifying glass icon in the upper right corner of the screen. A search bar will appear in the middle of the screen.

How to Block Websites on Mac Picture 2

Type terminalin Spotlight to find the Terminal app on Mac.

How to Block Websites on Mac Picture 3

Click Terminal. It's the first result that appears under the Spotlight search bar. The Terminal application will open.

How to Block Websites on Mac Picture 4

Enter the host file command. Type sudo nano /etc/hostsinto Terminal, then press ⏎ Return. The host file, the file that controls access to your websites, will be opened.

How to Block Websites on Mac Picture 5

Enter your admin password. Now, enter the password you used to log into your Mac into Terminal and click ⏎ Returnto confirm your identity and open the host file.

When typing, the characters contained in the password are not displayed. Therefore, you will not be able to see them on Terminal.

It may take a while to open the host file.

How to Block Websites on Mac Picture 6

Create a new line in the hosts file. Scroll to the bottom of the file using the arrow keys and press ⏎ Return.

How to Block Websites on Mac Picture 7

Type 127.0.0.1then tap Tab ↹to leave some space between 127.0.0.1and the next part of the text.

How to Block Websites on Mac Picture 8

Enter the website address. That's the web address of the site you want to block. Don't forget to include the "www" and ".com" suffix when typing.

For example, to block Google, you would type: 127.0.0.1 www.google.com.

If you plan to block multiple websites, each URL must be on its own line.

How to Block Websites on Mac Picture 9

Save and exit the editor. Once you have entered all the pages you want to block, save by pressing Control+ Othen ⏎ Return. To exit the host file, simply click on the red circle in the upper left corner of the window.

How to Block Websites on Mac Picture 10

Clear your Mac's DNS memory . You can do so by typing sudo killall -HUP mDNSResponder;say DNS cache has been flushedand pressing ⏎ Return. Essentially, clearing DNS will refresh your browser's memory, preventing you from accessing sites that were blocked through saved settings or similar.

Use the SelfControl app

How to Block Websites on Mac Picture 11

Go to the SelfControl page at https://selfcontrolapp.com/ . SelfControl allows you to block specific sites for up to 24 hours, helping to improve your productivity. Once blocked, until the time limit expires, no way can help you access that page.

This is what makes SelfControl really effective, but at the same time, this also means you'll have to be careful about blocking sites.

How to Block Websites on Mac Picture 12

Click the blue Download SelfControl button in the middle of the page.

How to Block Websites on Mac Picture 13

Install SelfControl. This step usually involves opening the SelfControl folder and dragging the DMG file into the "Applications" folder shortcut. First, though, you'll have to confirm the download on MacOS Sierra.

How to Block Websites on Mac Picture 14

Open SelfControl. Click Spotlight , type selfcontrol, and click SelfControl just below the search bar.

How to Block Websites on Mac Picture 15

Click Edit Blacklist . It's located in the lower right corner of the SelfControl window.

How to Block Websites on Mac Picture 16

Click the + option in the lower left corner of the window.

How to Block Websites on Mac Picture 17

Enter your website address. Don't forget to add the "www" prefix.

For example, you would type www.youtube.comto block YouTube.

How to Block Websites on Mac Picture 18

Press ⏎ Return. Your website will be added to the blocked list.

How to Block Websites on Mac Picture 19

Set block time. Click and drag the slider to the right to increase the page block time. Drag the slider to the left to reduce this time.

How to Block Websites on Mac Picture 20

Press Start when you're ready to block. This button is at the top of the window. At this point, your website will be blocked for the specified period of time.

Use parental controls

How to Block Websites on Mac Picture 21

Open Apple Menu. Click the Apple logo in the upper left corner of the screen to drop this menu.

This method only blocks websites on Safari.

Through parental controls, you cannot apply this website block to your own account, but can only apply it to another account.

How to Block Websites on Mac Picture 22

Click System Preferences in the drop-down menu.

How to Block Websites on Mac Picture 23

Tap Parental Controls . This option is located in the System Preferences window.

How to Block Websites on Mac Picture 24

Click the clock icon in the lower left corner of the screen.

How to Block Websites on Mac Picture 25

Enter your username and password. At this point, the menu will be unlocked and you can make changes to the parental management settings.

To do this, you must log into an administrator account.

How to Block Websites on Mac Picture 26

Select user. Click on a user's account name in the left pane to select that account.

You cannot choose your own account.

If no users are listed, select "Create a new user account with Parental Controls" and press Continue .

How to Block Websites on Mac Picture 27

Click the Web tab at the top of the window.

How to Block Websites on Mac Picture 28

Check the "Try to limit access to adult websites" box near the top of the window.

How to Block Websites on Mac Picture 29

Click the Customize option below the text "Try to limit access to adult websites". A new menu will appear.

How to Block Websites on Mac Picture 30

Click the + sign under the "Never allow these websites" heading. A text box will open.

How to Block Websites on Mac Picture 31

Type in the website address. That is the address of the page you want to block.

For example, to block Twitter, you would type www.twitter.com.

How to Block Websites on Mac Picture 32

Click ⏎ Returnto enter the address. At this time, the page you just entered has been blocked on the Safari browser of the selected accounts.

4 ★ | 2 Vote

May be interested

  • How to block websites that open on Coc Coc 100% successfullyHow to block websites that open on Coc Coc 100% successfully
    browsing the web on cốc cốc browser, sometimes you encounter cases where cốc cốc opens ads website links on its own. perhaps your computer contains adware running in the background, or your browser does not have pop-ups turned off. to block websites from opening on cốc cốc
  • Steps to block automatic opening of websites on Chrome browserSteps to block automatic opening of websites on Chrome browser
    when browsing the web, the website will automatically open, affecting your work. the following article will guide you to block automatic website opening.
  • How to Block Websites on FirefoxHow to Block Websites on Firefox
    although firefox does not have a website blocking function, you can install an extension to detect and block websites with adult and restricted content. if you need a more comprehensive method, you can edit the hosts file to block the site on multiple browsers. if you need to block on multiple devices on the network, using a service like opendns is the most effective way.
  • How to Block Unwanted Sites from Your RouterHow to Block Unwanted Sites from Your Router
    if you want certain websites to stop appearing and stimulate your curiosity, you don't need to spend money on network management software. you can use your router's settings to block unencrypted websites. in case the website you want to block is encrypted, you can use a free service like opendns to filter the site.
  • How to use ThreatSlayer to block malicious websites on ChromeHow to use ThreatSlayer to block malicious websites on Chrome
    the threatslayer utility helps users to browse the web on chrome browser from malicious websites, websites that can attack your computer with software or ads containing malicious content.
  • How to Block Websites on ComputerHow to Block Websites on Computer
    you want to block a website, for whatever reason, this is a simpler operation than you think. although it requires some code, but it is mainly copy and paste, all internet browsers allow you to block individual websites easily. make sure you understand the instructions well before proceeding. note: you need 'administrative' permission to make the changes below. that is, you must be the primary user of the computer and know the password.
  • How to Block Websites on Mac Browsers with Aobo FilterHow to Block Websites on Mac Browsers with Aobo Filter
    how do you block those unwanted websites in your child's mac? the first way that comes into your mind may be using the built-in parental controls. however, you can also find thousands of ways to bypass parental controls while you search in...
  • Do you know how to block websites on Chrome?Do you know how to block websites on Chrome?
    sometimes we get into trouble with some websites that often appear in the search section on a browser. this is annoying and annoying for many users. so how to block those annoying websites? quite simply, with support in the chrome browser extension, we can now block those sites easily.
  • How to block websites using your CPU to dig virtual moneyHow to block websites using your CPU to dig virtual money
    chances are, websites are using your computer's cpu to dig virtual money without you knowing. if you want to avoid this situation, here is a guide to block the website of virtual money digging through the browser by cpu.
  • How to block websites with bad content on Safari for iPhone and iPadHow to block websites with bad content on Safari for iPhone and iPad
    how to block websites with bad content on safari for iphone and ipad. content websites are the biggest worry when parents use entertainment devices such as iphones and ipads for children. however, we can control this content if we know how to prevent it with a few small settings in the article.