Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.0.0 != localhost == 127.0.0.1 #21

Closed
ghost opened this issue Sep 2, 2015 · 10 comments
Closed

0.0.0.0 != localhost == 127.0.0.1 #21

ghost opened this issue Sep 2, 2015 · 10 comments

Comments

@ghost
Copy link

ghost commented Sep 2, 2015

Please replace this line "0.0.0.0 localhost" to "127.0.0.1 localhost".
"0.0.0.0 localhost" is incorrect.

(I don't know why, I just can't make a pull request.)

@ghost
Copy link
Author

ghost commented Sep 22, 2015

For the use here in a hosts file, 0.0.0.0 might result in faster behavior for certain browsers and operating systems. In fact, you can just use a single 0 rather than 0.0.0.0 and reduce the size of the file, too.

http://www.dslreports.com/forum/r16790135-Large-Hosts-file-0-0-0-0-or-127-0-0-1
http://www.dslreports.com/forum/r24621780-hosts-127-0-0-1-vs-0-0-0-0
https://www.google.com/?gws_rd=ssl#q=0.0.0.0+or+127.0.0.1+in+hosts+file

@StevenBlack
Copy link
Owner

you can just use a single 0 rather than 0.0.0.0 and reduce the size of the file, too.

@SteveRiley well blow me down. Isn't THAT interesting! Thanks!

@StevenBlack
Copy link
Owner

Added label "enhancement" — going to try 0 in lieu of 0.0.0.0 because, man, that rocks.

@StevenBlack
Copy link
Owner

OK the latest commit now uses 0 instead of 0.0.0.0. Works great +1

@alterdaemon
Copy link

well, under Windows 10 "0 instead of 0.0.0.0" does not work for me...
I had to replace with 0.0.0.0

@StevenBlack
Copy link
Owner

OK. I concede :-)

I've just updated the hosts file which uses 0.0.0.0 now.

Thanks for all the input!

@ghost
Copy link
Author

ghost commented Oct 3, 2015

Well I feel pretty bad about that, sorry. For a 0 being the same thing as 0.0.0.0, I was just basing it on what I read. Next time, I'll test something myself before confirming it on forum like this.

@alterdaemon
Copy link

For the record:
there should be also "127.0.0.1 localhost", not "0.0.0.0 localhost" :)
cheers

@ghost
Copy link
Author

ghost commented Nov 23, 2015

there should be also "127.0.0.1 localhost", not "0.0.0.0 localhost" :)

+1

0.0.0.0 is for not-localhost
127.0.0.1 is for localhost

localhost should not be 0.0.0.0, because many software expect localhost is 127.0.0.1.

@StevenBlack
Copy link
Owner

@Espress0 line 8 of the current hosts file says

127.0.0.1 localhost

Have a look :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants