Reputation: 44709
What's the difference between these lines:
::1 localhost
...and
127.0.0.1 localhost
in Windows hosts file?
Initially I had the line of the first kind in my hosts file and typing localhost in the browser led me to 127.0.0.1. Then I didn't use localhost prompt in the browser for some time, and when I needed to use it again it just didn't work. I changed the first line form the second one in my hosts file and it worked. Why could that happen?
Upvotes: 9
Views: 7032
Reputation: 5501
The former, "::1" is IPv6 compressed syntax for the localhost. It is equivalent to 127.0.0.1. Did you disable IPv6 support in your OS or network adapter? Maybe that's why it stopped working.
Upvotes: 1
Reputation: 46633
::1 is IPv6
127.0.0.1 is IPv4
I guess you disabled IPv6 in between tests?
Upvotes: 2