Why does Ruby on Rails use http://0.0.0.0:3000 instead of http://localhost:3000?

Localhost means quite literally “your local host”, usually identified by 127.0.0.1 and all traffic to that address is routed via a loopback interface. If your Web server is listening for connections on 127.0.0.1, this means that it only accepts requests coming from the same host.

0.0.0.0 means that Rails is listening on all interfaces, not just the loopback interface.

Leave a Comment