Safari seems to ignore my /etc/hosts file

My /etc/hosts file contains this:


# 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 broadcasthost

::1 localhost

fe80::1%lo0 localhost


127.0.0.1 youtube.com



When I run the command traceroute youtube.com I receive the expected results (youtube.com is resolved to 127.0.0.1):

traceroute to youtube.com (127.0.0.1), 64 hops max, 52 byte packets

1 localhost (127.0.0.1) 0.272 ms 0.118 ms 0.063 ms


However, when I type youtube.com in Chrome or Safari, my browser doesn't establish a connection with 127.0.0.1 but instead with another IP address. I would have expected Chrome and Safari to resolve youtube.com to 127.0.0.1.


Why are Safari and Chrome seemingly ignoring my /etc/hosts file?

MacBook Air, OS X Mountain Lion (10.8.5)

Posted on Sep 20, 2013 5:22 AM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari seems to ignore my /etc/hosts file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.