Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or whatever) then I would use this public DNS to resolve to 127.0.0.1. It needs to be wildcarded so that no matter whatever comes before localhost.com it still resolves to 127.0.0.1.
-
6is it too much to ask for a public wildcard domain pointing to 127.0.0.1 that also has a public ssl cert and public private key? – Collin Anderson Jan 09 '13 at 15:23
-
1@CollinAnderson DNS doesn't provide SSL, it's the server sitting at that IP address that provides SSL, so you would need to set that up locally unfortunately. – Simon East Mar 20 '15 at 03:15
-
Exactly, I would need to install the given SSL key and certificate locally. Basically they would need to buy a wildcard certificate and make their private key public for anyone to use. It's not secure for use over an untrusted connection, but at least browsers won't complain. – Collin Anderson Mar 20 '15 at 15:09
-
One else: ``` $ dig localho.st @8.8.8.8 ;; ANSWER SECTION: localho.st. 14399 IN A 127.0.0.1 $ dig asd.localho.st @8.8.8.8 ;; ANSWER SECTION: asd.localho.st. 14399 IN A 127.0.0.1 ``` – Paramtamtаm Feb 07 '19 at 10:49
17 Answers
VMWare maintains this for their open cloud platform.

- 1,089
- 9
- 8
-
[vcap](https://github.com/cloudfoundry-attic/vcap) repository has been archived by the owner before Nov 9, 2022 – Abirdcfly Jan 03 '23 at 01:43
37Signals created a complete domain for mapping to any IP you want, http://xip.io. So for localhost you can using project.127.0.0.1.xip.io
I've had to starting using this for some proxy tools, as they were choking on request that didn't resolved to an IP using an external DNS call.

- 3,511
- 31
- 32
-
1Perfect. This appears to be the only one that supports non-loopback addresses. :-) – Simon East Mar 20 '15 at 03:24
-
1xip.io is the perfect domain for this use, 10.0.0.1.xip.io resolves to 10.0.0.1, www.10.0.0.1.xip.io resolves to 10.0.0.1, mysite.10.0.0.1.xip.io resolves to 10.0.0.1, foo.bar.10.0.0.1.xip.io resolves to 10.0.0.1 – Harikrishna Jan 07 '19 at 05:45
-
-
Port numbers have nothing to do with DNS resolution. DNS resolution happens, then default port based on protocol or the port specified is used. – Ryan Gibbons Dec 08 '20 at 14:30
-
-
242foo.com seems to be down. At least as of the last couple of days – Kevin Moore Feb 14 '12 at 21:32
-
3
-
6lvh.me a suggested replacement for smackaho.st: http://tbaggery.com/2010/03/04/smack-a-ho-st.html – whit537 Apr 05 '12 at 15:54
We've got a domain you can actually remember for this.
*.lacolhost.com
We'll maintain it for as long as we're able.
Developing with subdomains just got a lot easier: *.lacolhost.com

- 81
- 1
- 3
http://localhost.tv does the trick :-)
I bought since none of the existing 85 localhost domains were pointing at localhost...

- 2,772
- 1
- 29
- 37
Note: This domain has now lapsed so won't work as described below.
It looks like *.127-0-0-1.org.uk will do what you need.
http://www.ecclestoad.co.uk/2006/08/dns-entry-pointing-to-localhost
Examples:
-
1I let the 127-0-0-1.org.uk domain lapse a while back so this won't work anymore. Sorry. *.vcap.me is a better replacement to use. – EvdB Apr 04 '12 at 13:53
If nothing else, you could just register a domain for yourself and set it up so that's how it behaves.

- 773
- 2
- 9
- 22
Feel free to use *.localhst.co.uk (note missing second 'o'). I'll keep it alive as long as I am, and the internet is still a thing. Handy for people who want to test with two levels of TLD.

- 577
- 1
- 3
- 18
You can go to http://afraid.org and register one.. You can get free domains(well subdomains, but you have complete control over A and NS and such records) and point one at 127.0.0.1. They support wild-cards

- 62,085
- 98
- 303
- 499
-
@Earlz :) 127.0.0.1 is not the universal IP address to Rahul's house. That would resolve to local host on the DNS server at afraid.org. – orokusaki Mar 09 '10 at 06:23
-
1@oro What he is looking for then is a dynamic IP service. I understood from the question that he wanted just a domain that pointed at 127.0.0.1 which would be the IP of the person that is browsing the domain. – Earlz Mar 09 '10 at 16:35
-
1Give that a try and see how it works. Look up how DNS works, and you'll understand why it's impossible. – orokusaki Mar 10 '10 at 03:19
-
1Why would it be impossible.. It's just a pointer, it's very well possible to have an A record pointing to 127.0.0.1. – Arda Xi Jul 02 '10 at 12:49
If you are using Windows DNS, you can create a new zone, then you DnsCmd to add A records for @ and *.
dnscmd /RecordAdd local * 3600 A 127.0.0.1
dnscmd /RecordAdd local @ 3600 A 127.0.0.1

- 16,358
- 9
- 56
- 65
Why not using the literal IP address in the URL?
http://127.0.0.1/
(old IPv4)http://[::1]/
(new IPv6)

- 34,164
- 12
- 67
- 91
-
3My particular problem is I'm using host headers in IIS. In addition I'm working on portal software which displays different content based on the URL requested. – Oct 14 '09 at 17:07
I have set up my own that you can use:
home.pdobson.com resloves to 127.0.0.1

- 1,856
- 21
- 21
This domain resolves to 127.0.0.1:
www.mouse-potato.com
-
2But the question asks for a domain *all* of whose sub-hosts redirect to 127, not just `www`. – Brandon Rhodes Apr 19 '11 at 13:18
somesite.com is the first one I knew about, however I found a whole bunch here
http://www.websiteoutlook.com/www.somesite.com
Check the 20 other sites point to 127.0.0.1. I have no idea how long these sites will stay pointing to 127.0.0.1.

- 9
- 1
-
2Probably valid at the time this comment was made, but the domain no longer points at localhost. – Brandon Rhodes Jan 28 '11 at 16:30
Your hosts file in C:\WINDOWS\system32\drivers\etc ought to be able to do this, just add one single line like this:
127.0.0.1 www.mydomain.com
Additionally, use a server like apache or a program with it like wamp, and just go to http://localhost

- 17,939
- 45
- 124
- 193
-
1I don't see why anyone downvoted this answer. This is the best answer here. What the OP is asking is impossible. – orokusaki Mar 10 '10 at 17:35
-
5Maybe because he says " I don't have control of DNS settings (hosts file or whatever) "? – Arda Xi Jul 02 '10 at 12:48
-
4This fails to answer the question: it creates only one name, `www`, that points to 127, whereas the questioner needs every possible sub-name to point there. And I have no idea why @orokusaki thinks the question is "impossible" since several people offered ways to accomplish the goal quite easily. – Brandon Rhodes Apr 19 '11 at 13:20
-
-1 because the title of the question includes "wildcard" which this answer will not solve. – Costa May 06 '13 at 22:14