The hosts file, used to map hostnames to IP addresses. This tag is for questions relating to usage of this file, including reading and modifying its contents to change which IP a hostname is mapped to.

learn more… | top users | synonyms

5
votes
1answer
412 views

What are these google host entries that keep showing up automatically in my etc/hosts file?

I went to edit my /etc/hosts file and found a bunch of entries for google urls that I never put there. When I try to delete it, it just comes back. I tried searching google for it but to no avail. ...
2
votes
1answer
66 views

User specific host file

I would like to add a user specific host file on my Mac (El Capitan 10.11.5) to a users home directory and have this be checked in addition to /etc/hosts when resolving domain names. I found a ...
-2
votes
3answers
70 views

how to block youtube in the hosts file

I know how to block websites in the host file and it works with others, but with YouTube i just can't get it to work. What am I missing? 127.0.0.1 youtube.com 127.0.0.1 www.youtube.com
2
votes
2answers
46 views

Adding website to block via /etc/hosts not working

I block some websites via /etc/hosts on my machine. But for reddit.com it does not work. What does I have to do? ## # Host Database # # localhost is used to configure the loopback interface # when ...
9
votes
6answers
41k views

problem accessing localhost on Mac OS X Mavericks…it was working fine until I rebooted today

I am perplexed about the problem I am having and would really appreciate help resolving it. I have an iMac running Mac OS X Mavericks 10.9.2 I have set up my apache to serve documents from the ...
0
votes
0answers
12 views

Q: Way to limit (not block) frequency of certain connections?

Third party software is okay, although I've tried things like Little Snitch, and the closest feature they have is the ability to create "temporary rules" (i.e. rules that allow/disallow specified ...
1
vote
3answers
1k views

Cannot use ssh/ping domain name after connecting to openvpn

I've got two macs, both on the same network, both using Tunnelblick to connect to vpn. Both with same settings. Both connect fine and both have the same settings for DNS and search domain applied ...
1
vote
1answer
830 views

/etc/hosts will not update/refresh at all

I add to my /etc/hosts file this : 127.0.0.1 youtube.com Save the file. Flush everything with : dscacheutil -flushcache; sudo killall -HUP mDNSResponder Reboot my computer 30 times. Then I run: ...
3
votes
2answers
39 views

Where to insert a custom item in /etc/hosts file?

The default /etc/hosts file looks like this: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost If I want to insert a custom item, should I insert it after the ...
1
vote
1answer
175 views

Blocking an IP address

I need to block a particular website on my Mac (OSX 10.11.1, El Capitan). I have already made the changes to /etc/hosts but the website is still not blocked when testing from Chrome. I think this has ...
1
vote
3answers
433 views

How can I force Google SafeSearch on my kids' Mac?

I'm pretty sure there's a way to force enable Google Safe Search by editing a hosts file on my kids' Mac. Can someone tell me how? I'm guessing I need to sudo nano /etc/hosts According to How to: ...
0
votes
1answer
217 views

Why is there a hosts.equiv file in my /etc folder?

I'm running OS 10.11.1 on my Macbook Pro. I should also preface my question with the admission that my knowledge of the Mac OS is practically zero. I was looking at (not editing) the hosts file in ...
0
votes
2answers
115 views

Keyboard Maestro: How to write to /etc/hosts file

So I have been using an app called Self Control to block certain sites globally on my machine so I'm not distracted when I work. The method this program uses is edit your /etc/hosts file and redirect ...
0
votes
1answer
48 views

xampp + mac os x issues

just installed XAMPP and have tried setting up a local server but the address won't resolve. It will lead to a "Connection Was Reset" error. I tried looking in the logs but none were present so I'm ...
0
votes
2answers
79 views

What happens if I edit a duplicate Hosts file?

What exactly is a duplicate file? When I wanted to edit the hosts file (/private/etc/hosts), it says: You don't own the file "hosts" and don’t have permission to write to it. You can ...
7
votes
5answers
12k views

How to edit the /etc/hosts file?

When I open the file with TextEdit (I don't want (truly, I am not able) to use vim), it is seen as "locked", even if I modify the permissions of the file via the "Get Info" window. How can I modify ...
-1
votes
0answers
44 views

Terminal Command to Edit Hostname [duplicate]

How can I edit the Hostname of my MacBook Pro via the CLI? Currently running Mac OS X Yosemite (Version 10.10.5).
0
votes
1answer
787 views

How to edit hosts with TextEdit on Yosemite?

This line used to work sudo -b "/Applications/Textedit.app/Contents/MacOS/TextEdit" /etc/hosts But on Yosemite, it does not work anymore.
1
vote
0answers
64 views

OSX etc/hosts not blocking one particular site

I've used etc/hosts to block a lot of sites without issue, however I'm trying to add in filterbypass.me to the list but it won't work. I've tried adding: filterbypass.me as well as all the http/https/...
3
votes
1answer
176 views

Hosts file being reset after every reboot

My /private/etc/hosts file is being reset after every reboot. I can make my changes, save the file, and it will work. Right up until I reboot my Mac. Has anyone found a work around for this or a way ...
2
votes
2answers
615 views

Mac OS X Mavericks DNS name lookup order change?

I noticed Mavericks prefers the DNS server to /etc/hosts (scutil --dns). There used to be a good 'ol "order hosts,bind". Is there anything equivalent for Mavericks so my hosts file is consulted before ...
0
votes
5answers
7k views

why cannot I edit my `hosts` file?

I'm trying to edit my hosts file, because doing ssh <some host in hosts> fails to translate to ip. according to the Finder UI it is found under: however when trying to run cat hosts from the ...
0
votes
1answer
432 views

What happens if I remove the localhost address from /etc/hosts

I have looked at the hosts file before but never thought of this. The hosts file overrides the DNS addresses so it can be used to forward sites or to block them. When looking at the file, the default ...
0
votes
1answer
372 views

Ping respects hosts overrides - but browsers don't, in spite of DNS cache flushes

I have a baffling problem. Browsers on my system (10.10.3 Yosemite) don't respect overrides included in my hosts file. This includes Chrome, Safari, and Firefox. I have tried rebooting, clearing ...
3
votes
2answers
3k views

Sites blocked in /etc/hosts often doesn't work

I'm using a Macbook Pro as a productivity/work machine and have Facebook and reddit blocked with /etc/hosts: ## # Host Database # # localhost is used to configure the loopback interface # when the ...
1
vote
1answer
531 views

Multiple .local hostname on one computer

Is possible setup multiple .local hostname on one physical computer? Background: home network (behind the DSL/NAT router) (192.168.1.*) have a mac-mini, called as "tango.local". (set in the System....
1
vote
1answer
162 views

I Would Like To Host an HTML Website Without Using Server.app

I am somewhat a novice when it comes to the Apache web server. I currently host Ruby on Rails applications on my Mac Mini Server (Mavericks) using Phusion Passenger. I know that some of the config ...
1
vote
3answers
6k views

How to edit the hosts to block IP address?

I know how to block certain website, like if I want to block google I can use this line in the host 0.0.0.0 www.google.com.hk www.google.com.hk But my question is how can I block certain IP ...
1
vote
0answers
517 views

iOs Simulator ignoring Hosts file

I'm actually working on a website development and I configured all the needed hostname on my /etc/hosts files. Actually in our office we use an internal DNS for the QA servers and we override ...
0
votes
0answers
958 views

Apache local domain not resolving [hosts are being ignored]

I'm having issues getting a local domain to resolve. In chrome when trying to load http://dashboard.example.local I get the following error code: DNS_PROBE_FINISHED_NXDOMAIN But it's the typical "...
1
vote
1answer
201 views

Getting home.dev to resolve to 127.0.0.1

In my hosts file I have: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 ...
133
votes
8answers
295k views

How to change computer name so terminal displays it in Mac OS X Mountain Lion? [duplicate]

When I setup my computer I named it "Scott's MacBook Pro". And so when I go to System preferences->Sharing, it says Scott's MacBook Pro there as my computer name. However, opening up a terminal gives ...
10
votes
4answers
66k views

Add a hosts file entry without jailbreaking

I have an iPad that needs to be able to connect to a server via its short hostname, e.g. http://app instead of http://app.example.com. The network it connects to assigns it a domain name other than ...
1
vote
1answer
434 views

OS X Server 3.0 - DNS & Server Names

I have two Mac Mini's running Mavericks Server. The hostnames for them are as follows: macsvr01.mydomain.com macsvr02.mydomain.com I want to be able to access macsvr02 by going to cloud.mydomain....
2
votes
1answer
720 views

Adding hosts entry to iOS in absence of DNS

I am working with an application where my iPhone needs to see my laptop on the network under its host name and not the IP address because the SSL certificate works with the name only. At the office, ...
2
votes
1answer
7k views

osx hosts file not working

my hosts file looks like this it should open facebook if you try to open google 173.252.110.27 google.com ## # Host Database # # localhost is used to configure the loopback interface # when the ...
5
votes
1answer
3k views

Chrome slow when loading local virtual host

I'm developing a local website with MAMP. I've configured a virtual host (hosts files, and apache vhosts). /etc/hosts file: 127.0.0.1 domain.com MAMP Vhosts config <VirtualHost *:80> ...
0
votes
2answers
5k views

How to redirect out going traffic to an IP address to another host name?

How can I redirect an IP say 203.130.48.8-bj-cnc or 203.130.48.8 to Google.com in host file (or other places)? It looks like host file doesn't redirect an ip address (only the domain names).
1
vote
0answers
19 views

How can I send an email from within iCloud.com using a different email address? [duplicate]

I have my own private domain hosting solution with email, for example, test@test.com. When I am using the iCloud.com website from my browser, let's say for creating a spreadsheet, I will want to shed ...
0
votes
1answer
2k views

What is localhost.pharos from Netstat?

Over past week, netstat reflects an established connection to localhost.pharos. Googled Pharos and it's a software which enables printing services at Universities/Enterprises. Any ideas why ...
3
votes
2answers
259 views

when is the /etc/hosts file loaded?

I'm trying to configure some virtual hosts and I'm quite confused as to when this file is loaded. At what point is /private/etc/hosts loaded? When logging in? At every DNS call? When Mac OS restarts?
1
vote
1answer
128 views

Admin in Terminal, logged on Family's session

I have a weird problem. I'm trying to connect on my VPN with Mac 10.7.5 (Java 7 U45, Citrix Receiver 11.8) but when I do, JSam is not able to write in Hosts file. So my Mac session is called "Family" ...
1
vote
0answers
58 views

Weird local domain behaviour

I just clean installed mavericks on my mac and local domains i use for web development still work. Surely clean install wipes the host file, so how is this possible? Its not really a problem, i am ...
3
votes
1answer
2k views

Can entry duplicates (or multiples) in etc/hosts do any damage?

Can entry duplicates in etc/hosts do any damage? For example: ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ...
7
votes
3answers
19k views

Cannot access localhost after upgrade to Mavericks but can access 127.0.0.1

I ran across this question, but it wasn't resolved (and it hasn't been touched in a while). I'm not sure if my issue is the same, but I don't have enough reputation here to comment on that question. ...
3
votes
1answer
235 views

How set up a local domain such as local.test?

I'm web-developer and I need local domains. Before 10.7.2 update, I'm just fix /etc/hosts as I need, but new update crash this solution. How fix this new "feature"?
0
votes
1answer
203 views

OS X 10.8 hosts file completely ignoring new entries. Help!

I have a hosts file that I've added a couple URLs to a while back and it's been working fine, but any new entries now get completely ignored. I've added these to test it... google.com test-...
0
votes
1answer
191 views

editing /private/etc/hosts

I just added my no-ip domain to /private/etc/hosts under a shorter alias: alias host.no-ip.biz I tried the following on the shell: dscacheutil -flushcache but it still says: ssh: Could ...
4
votes
2answers
971 views

Shared Internet apply /etc/hosts

How do I make those who connect to me via a shared internet connection use my /etc/hosts file? I was thinking something along the lines of creating a DNS server, but I was hoping maybe there is a ...
4
votes
3answers
513 views

How do apps get loaded on iOS for free

I have Googled over and over and cannot get an answer to a fundamental question I have. To get an app downloaded onto an iPhone, do I need to open an apple account of some sort and pay for the account ...