Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My windows 7 is messed up somehow and no one seems to know what is wrong. My localhost runs so slow it is not even funny. To run my website on local host takes like 20 seconds to load up.

I change it to 127.0.0.1 and it loads up in 1 second. So I am not sure what the difference is between them.

I am also unsure how to set 127.0.0.1 to load up instead of localhost when running my website through Visual Studio Web Developer Express 2008.

share|improve this question

migrated from stackoverflow.com Sep 17 '09 at 7:41

This question came from our site for professional and enthusiast programmers.

2  
seems like a DNS problem. Belongs to serverfault.com –  Aziz Sep 17 '09 at 6:16
3  
Might also be related to IPv6. Widnows Vista and 7 use IPv6 by default. Anyway, I'd rather move this to Super User than Server Fault. –  Јοеу Sep 17 '09 at 6:18
    
agreed with Johannes, this should be on Super User. It's not a server or programming question, it's a windows question. Voted to move/close. –  Gabriel Hurley Sep 17 '09 at 6:27
    
It could be that your system is infected by something that took your HOSTS file hostage... –  Wim ten Brink Sep 17 '09 at 8:59
add comment

3 Answers

up vote 4 down vote accepted

localhost is just a name mapped in your 'hosts' file. possibly located at:

c:\windows\system32\drivers\etc\hosts

I agree with aziz, that it's something underlying issue with DNS on your system.

share|improve this answer
2  
Note, in Windows 7 the "localhost" to IP address (v4 or v6) is done in the DNS client code not in the hosts file (the file contains a comment to this effect). –  Richard Sep 17 '09 at 9:40
add comment

First of all 127.0.0.1 is a IPv4 address and localhost is a host name. Host names must be resolved to get IP addresses. They can be resloved by DNS and the hosts file at c:\windows\system32\drivers\etc\hosts.

This is the entry of my hosts file:

::1 localhost

But what is this: "::1"? An IPv6 address for the local computer. You can check your web app with this url against this IPv6 adress:

http://[::1]/

This request must do well. If not your web system has problems with IPv6 addresses. If this request is ok, you have an DNS issue.

share|improve this answer
add comment

You may improve speed by changing

 ::1 localhost

to

 127.0.0.1 c:\windows\system32\drivers\etc\hosts

As far as I know ::1 is device identifier, so it uses its IP address. Since loopback is almost fixed, you can safely change it.

share|improve this answer
2  
::1 is the IPv6 version of 127.0.0.1 –  Terje Mikal Sep 17 '09 at 9:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.