Public Wildcard Domain Name To Resolve To 127.0.0.1 [closed]

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.

13.10.2009 21:18:44
is 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 9.01.2013 15:23:12
@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 20.03.2015 03:15:53
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 20.03.2015 15:09:43
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 ```
Tarampampam 7.02.2019 10:49:52
17 ОТВЕТОВ

Why not using the literal IP address in the URL?

  • http://127.0.0.1/ (old IPv4)
  • http://[::1]/ (new IPv6)
0
14.10.2009 07:02:41
My 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.
user189422 14.10.2009 17:07:53

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
1
14.10.2009 20:17:42

If nothing else, you could just register a domain for yourself and set it up so that's how it behaves.

2
14.10.2009 20:27:17

This domain resolves to 127.0.0.1:

www.mouse-potato.com

-1
1.11.2009 02:07:21
But the question asks for a domain all of whose sub-hosts redirect to 127, not just www.
Brandon Rhodes 19.04.2011 13:18:20

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.

-1
19.11.2009 21:54:23
Probably valid at the time this comment was made, but the domain no longer points at localhost.
Brandon Rhodes 28.01.2011 16:30:26

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

2
19.11.2009 21:56:13
@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 9.03.2010 06:23:25
@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 9.03.2010 16:35:51
Give that a try and see how it works. Look up how DNS works, and you'll understand why it's impossible.
orokusaki 10.03.2010 03:19:18
Why 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 2.07.2010 12:49:21

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

-4
19.11.2009 22:04:35
I don't see why anyone downvoted this answer. This is the best answer here. What the OP is asking is impossible.
orokusaki 10.03.2010 17:35:10
Maybe because he says " I don't have control of DNS settings (hosts file or whatever) "?
Arda Xi 2.07.2010 12:48:41
This 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 19.04.2011 13:20:14
-1 because the title of the question includes "wildcard" which this answer will not solve.
Costa 6.05.2013 22:14:00
14
10.03.2010 05:32:43
Perfect! This is exactly what the questioner was wanting.
Brandon Rhodes 28.01.2011 16:21:20
42foo.com seems to be down. At least as of the last couple of days
Kevin Moore 14.02.2012 21:32:06
smackaho.st is letting the domain expire.
Walking Wiki 26.03.2012 21:24:19
lvh.me a suggested replacement for smackaho.st: tbaggery.com/2010/03/04/smack-a-ho-st.html
whit537 5.04.2012 15:54:38

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:

5
4.04.2012 15:15:30
I 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 4.04.2012 13:53:39

*.vcap.me

VMWare maintains this for their open cloud platform.

38
10.10.2011 14:24:39

I have set up my own that you can use:

home.pdobson.com resloves to 127.0.0.1

-1
9.05.2012 20:07:22

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

7
16.08.2012 19:42:38

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.

25
28.08.2012 15:48:17
Perfect. This appears to be the only one that supports non-loopback addresses. :-)
Simon East 20.03.2015 03:24:26
xip.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 7.01.2019 05:45:41

http://localhost.tv does the trick :-)

I bought since none of the existing 85 localhost domains were pointing at localhost...

5
9.01.2013 21:16:51

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.

2
15.06.2013 17:30:28

I've just found a great solution: lvh.me

you can try it:

8
23.07.2013 15:52:26

http://*.localtest.me seems to work, except readme.localtest.me.

2
30.12.2017 21:11:06