Introduction: Blocking Websites (and Ad's) on a Macintosh.

Picture of Blocking Websites (and Ad's) on a Macintosh.

Want to block access to a certain website or you want a decent ad blocker on the mac? If so read on.

Here are a few reasons why you might wish to do this.

1. so you can play flash games without ads

2. The person who owns said computer is a complete slob addicted to said website.

4. Said website is completely inappropriate e.g. a racist website.

5. You are trying to stay off said website.

Step 1: Download the File or Create Your Own

Picture of Download the File or Create Your Own

             This file is what we will be using later to block sights. If you open it it will not start blocking websites we will make it block websites later. You may have noticed that it say's 127.0.0.1 then a url a lot this is because 127.0.0.1 tells it to block the following url. So if it said "127.0.0.1 www.facebook.com" (without the quotes of course it would block Facebook)! So create a new line and type "127.0.0.1 than a url" (without the quotes and replacing "than a url" with the url that you want to block).If you want to block multiple url's create a new line for each typing 127.0.0.1 first. If you do not want to download the file but instead want to create your own create a document that you can enter text into it does not matter what format (e.g. rtf, txt, doc, word). and type "127.0.0.1 than a url" (without the quotes and replacing "than a url" with the url that you want to block). Don't forget to do each url on a new line following 127.0.0.1.

Step 2: Make It Block

Picture of Make It Block

Now to make your computer block those addresses open up terminal which is located in ./Applications/Utilities. Now you need to type in "sudo nano /private/etc/hosts" (without the quotes) and copy and paste the contents of the document you made into the shell (the window). Now we need to save and exit we do this by pressing control-o, followed by the return button, which in turn is followed by control-x,which will get followed by return, and finally we type exit and press return. You may now quit terminal. If you try accessing one of the url's on that list you should get an error but for me it takes me to a iweb website that I published to a local folder.

Step 3:

Picture of

So you have had your fun and they threatened to bury you alive under 20 tons of dirt if you don't fix it for them. Well in order to regain access to a website you simply need to type in "sudo nano /private/etc/hosts" (without the quotes) and delete the url you want to regain access to. Now we need to save and exit we do this by pressing control-o, followed by the return button, which in turn is followed by control-x,which will get followed by return, and finally we type exit and press return. You may now quit terminal.

Pic. 1 blocked

Pic. 2 unblocked

The image note thing is having problems for me but in picture 1 you may have noticed that it did take me to a site that is because I made a site in iweb and published it to a local folder but you should get an error message

Step 4: Credit

A third of the credit goes to rfanitic who now goes by Anonymous for sending me the file a third of the credit goes to the guy rfanatic got it from which is some random person on the internet a sixth of the credit goes to me and a sixth of the credit goes to the instructables community for inspiring me to right this. Now go play flash games without ads while listening to Dimrain47 and hopefully voting for me.

Comments

JadeD8 (author)2015-11-24

I use Aobo Filter for Mac to block websites on my Mac.

About This Instructable

956views

2favorites

License:

Bio: Something random.
More by ElvenChild:Running Freeciv on a Mac (10.8 Mountain Lion)Censoring Music With GaragebandHow To Use The Instructables For iPhone App
Add instructable to: