hosts file

Joined
Jul 11, 2014
Messages
296
Reaction score
5
Points
18
Your Mac's Specs
A1286 MBP5,3 running 10.9.5, iphone6, Mac mini1,1 A1176 120/2gb
Will someone please give me the location of the hosts file for OSX, 10.9.5 on my MBP? I need to restrict internet addresses. Sorry but thanks in advance.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
558
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
It's at /private/etc/hosts.
 
Joined
Mar 30, 2013
Messages
156
Reaction score
1
Points
18
Location
US
Your Mac's Specs
13" MBP, OSX 10.8.5, 2.5 GHz Intel core i5 4 GB 1600 MHz DDR3 - I also have an iPad Air.
I saw an article on this at wikihow. For someone who's not tech savvy- (me), I don't feel comfortable editing the hosts file, though I really need to block some sites also. I'm very glad someone asked this question. The article explains how to edit the hosts file, and also has 3 other ways of blocking sites.

Could someone tell me if these instructions are any good and any other additional advice? I surely don't want to get myself in trouble, and wonder if the app mentioned there is any good.

The router idea it explains about, seems workable, though I don't know how to get into mine. I knew how to get into my old router, but the one I have now I got from my ISP, the other I bought many years ago. It had good enough instructions, I was able to follow them very well. Anyway,
here's the link to the wikihow article:

www.wikihow.com/Block-a-Website-on-Mac

Also, if I wanna try any of these, I thought of a way I can get back online if I get in trouble- if I set up my wireless first, I can use my iPad. If something did go wrong, would I be able to get on that way to get help here?
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,249
Reaction score
1,830
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
It's best to leave your hosts file alone. Any mistakes with the hosts file can wind up preventing you from going on line at all. The best method would be to use the firmware built into your router. However, your router has to specifically support that feature. Most modern routers do but there are some that don't. You have to learn how to enter your router's setup menu using your browser and make the changes in the appropriate place. Do you have a manual or PDF instructions for your router?
 
Joined
Mar 30, 2013
Messages
156
Reaction score
1
Points
18
Location
US
Your Mac's Specs
13" MBP, OSX 10.8.5, 2.5 GHz Intel core i5 4 GB 1600 MHz DDR3 - I also have an iPad Air.
It's best to leave your hosts file alone. Any mistakes with the hosts file can wind up preventing you from going on line at all. The best method would be to use the firmware built into your router. However, your router has to specifically support that feature. Most modern routers do but there are some that don't. You have to learn how to enter your router's setup menu using your browser and make the changes in the appropriate place. Do you have a manual or PDF instructions for your router?
hello chscag, thanks for responding so quickly. I had a feeling someone would say to leave the hosts file alone, even my intuition said leave it alone, that's why I didn't touch it, but wanted to ask about the instructions in case someone who had more experience could benefit by them. I don't think my current router has any instructions for getting into it like my other one did. :(
 

Slydude

Well-known member
Staff member
Moderator
Joined
Nov 15, 2009
Messages
16,919
Reaction score
665
Points
113
Location
North Louisiana, USA
Your Mac's Specs
2.8 GHz 2008 MacBook Pro 10.11, 8 GB mem, iPhone 12 Pro Max, 2015 iMac 16 GB Big Sur
What router are you using?
 
OP
A
Joined
Jul 11, 2014
Messages
296
Reaction score
5
Points
18
Your Mac's Specs
A1286 MBP5,3 running 10.9.5, iphone6, Mac mini1,1 A1176 120/2gb
Thanks to all that chimed in.
I felt dumb after asking it. I found this site that had a good tutorial.
How to Block a Website | Digital Trends
Oh well. At least I have the answer now and thanks for sharing.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
558
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If anyone decides to go the hosts file route, make a backup first. The caution made by chscag is a valid one.
 
Joined
Mar 30, 2013
Messages
156
Reaction score
1
Points
18
Location
US
Your Mac's Specs
13" MBP, OSX 10.8.5, 2.5 GHz Intel core i5 4 GB 1600 MHz DDR3 - I also have an iPad Air.
What router are you using?
hello sly, my router is built into the modem from the ISP, the modem's name is cisco. I'm sure there's a way into it, but I don't remember how to do it with the ones from the ISP.
 
Last edited:
Joined
Mar 30, 2013
Messages
156
Reaction score
1
Points
18
Location
US
Your Mac's Specs
13" MBP, OSX 10.8.5, 2.5 GHz Intel core i5 4 GB 1600 MHz DDR3 - I also have an iPad Air.
If anyone decides to go the hosts file route, make a backup first. The caution made by chscag is a valid one.
When I first got into computers, the motto was, "back up or die." Every instruction on making any changes always says before doing anything, to back up. On the page I posted, it also says to back up first. :D
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top