Safari can't connect to localhost

I'm trying to use Focus, an app that redirects blocked websites through localhost. However, while this works properly with Chrome and Firefox, Safari gives me an error message as in the attached image.


If in the web address I replace localhost with 127.0.0.1 everything works fine. How can I fix this?


The content of my /private/etc/hosts file is the default one, i.e.


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


MacBook Pro 15", macOS 10.14

Posted on Mar 21, 2019 12:00 PM

Reply

There are no 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 can't connect to localhost

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