`localhost` usually refers to the special addresses `127.0.0.1` and `::1` that map to a loopback device, which allows a computer to connect to itself.
Questions tagged [localhost]
659 questions
337
votes
5 answers
What's the difference between 127.0.0.1 and 0.0.0.0?
I understand that 127.0.0.1 points to localhost, and so does 0.0.0.0 (correct me if I'm wrong). So, what's the difference between 127.0.0.1 and 0.0.0.0?
Sagnik Sarkar
- 3,461
- 3
- 11
- 9
96
votes
6 answers
Why is localhost IP 127.0.0.1?
I wondered what is the origin of the decision to make localhost's IP address 127.0.0.1. What is the "meaning" of 127? what is the "meaning" of 0.0.1?
Roee Adler
- 1,588
- 4
- 17
- 27
70
votes
2 answers
Why is my localhost not 127.0.0.1 but ::1, and what notation is that?
When I use the Ping command against my localhost (on Windows Vista), it doesn't show up as 127.0.0.1.
C:\Windows\system32>ping localhost
Pinging GIGA [::1] from ::1 with 32 bytes of data:
Instead, it shows up as ::1 (pair of colons and a one).…
Samir
- 20,527
- 74
- 166
- 226
53
votes
4 answers
How to kill a localhost:8080
I'm trying to kill a dev server setup via yarn on Windows. While I Ctrl+C'd the command prompt, when I went back to localhost:8080 it had not stopped. How can I kill the process?
Sam Fuller
- 522
- 1
- 4
- 9
49
votes
2 answers
How can I use curl with ::1 for ipv6 based loopback?
I tried a few ways but they seem to be confusing curl.
root@testt:~# curl localhost:8080
Hello world!
Boom Bam Splat
root@testt:~# curl ::1:8080 curl: (3) IPv6 numerical address used in URL without brackets root@testt:~# curl…
hak8or
- 722
- 1
- 6
- 17
46
votes
3 answers
How to find out what is running on localhost port
I have something running at port 9090 on my local machine.
It's probably something I set up long ago and forgot about... how can I find out what it is?
I am using Windows 8.
BanksySan
- 713
- 2
- 7
- 15
38
votes
6 answers
Why is there a difference between ping "localhost" and ping "local IP address"?
Using cmd and ping on Windows gave me the following results:
Pinging "localhost":
Pinging "192.168.0.10" (local IP address):
Aren't both situations exactly the same?
I mean, I'm pinging the same interface, the same machine and the same…
Diogo
- 30,192
- 65
- 150
- 222
37
votes
5 answers
ERR_ICANN_NAME_COLLISION when trying to use localhost .dev in Chrome
Today I got this error when trying to access local domains specified in apache httpd-vhosts.conf. It happened for the 1st time with a .dev domain, so it seemed plausible that in light of recent news Goggle finally got it.
However, I tried with other…
konrad
- 475
- 1
- 4
- 6
37
votes
1 answer
How to alias a hostname on Mac OSX
In a nutshell, I would like to be able to open a browser and open local.example.com but it actually loads http://localhost/path/to/example.com/
I am using Mac OSX 10.5, and not afraid to get my hands dirty with the terminal :)
I use Apache as my…
Austin Hyde
- 1,054
- 4
- 13
- 22
35
votes
7 answers
The easiest way to serve a page to localhost on OS X
I have a page that I need to serve on localhost for the fonts to appear properly.
What is the easiest way to do this (on a Mac)?
Zachary Russell Heineman
- 792
- 1
- 6
- 9
35
votes
3 answers
Why does the registered domain name “localtest.me” resolve to 127.0.0.1?
I was reading an article about Server-Side Request Forgery. In that article the attacker found that 127.0.0.1 was open to the internet. The victim then blocked 127.0.0.1, but because many other IPs and apparently also some domains are also resolved…
not2qubit
- 1,993
- 4
- 28
- 35
35
votes
3 answers
How can I specify IP and ports for a hostname in the Windows hosts file?
I want to specify host names with two different ports in the Windows hosts file.
Is there a way to do it? Or is it not allowed by Windows itself?
I have been wasting my time searching for the solution for the last 8 hours.
Is it possible to…
SIA
30
votes
3 answers
Curl local host names on Mac OS X Yosemite
I just upgraded from Mavericks to Yosemite, and now curl can't see loopback host names.
Set up a simple http server to test:
$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
Now I can hit localhost:8000 in chrome. I can even wget…
Nick Retallack
- 1,906
- 3
- 16
- 21
28
votes
3 answers
I have a domain name that I want to redirect to my local server. How do I do this?
This may be better suited for Server Fault, so someone can migrate it if need be.
For the purposes of testing, I want to redirect a domain name I own to my localhost. How do I do this? Can I simply set the redirect to 127.0.0.1? Also, I am using…
starscape
- 393
- 1
- 3
- 7
27
votes
4 answers
IE doesn't work with localhost + port
I have a NodeJS server running on my local machine for development purposes. By default, it uses port 1337. (I've tried a handful of other ports such as 8080, 1234, 9000, 9090, 65432 et al).
I can successfully connect to this NodeJS server from…
mawcsco
- 873
- 2
- 8
- 22