Public Wildcard Domain Name To Resolve To 127.0.0.1 [closed]
Asked Answered
L

17

53

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.

Loudish answered 13/10, 2009 at 21:18 Comment(4)
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?Gunnysack
@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.Balbinder
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.Gunnysack
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 ```Billen
M
41

*.vcap.me

VMWare maintains this for their open cloud platform.

Monstrous answered 10/10, 2011 at 14:24 Comment(1)
vcap repository has been archived by the owner before Nov 9, 2022Nagaland
S
28

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.

Struggle answered 28/8, 2012 at 15:48 Comment(4)
Perfect. This appears to be the only one that supports non-loopback addresses. :-)Balbinder
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.1Montevideo
It doesn't seem to support port numbers though?Batiste
Port numbers have nothing to do with DNS resolution. DNS resolution happens, then default port based on protocol or the port specified is used.Struggle
W
14
Wrangler answered 10/3, 2010 at 5:32 Comment(4)
Perfect! This is exactly what the questioner was wanting.Spicule
42foo.com seems to be down. At least as of the last couple of daysThanks
smackaho.st is letting the domain expire.Stepper
lvh.me a suggested replacement for smackaho.st: tbaggery.com/2010/03/04/smack-a-ho-st.htmlMonstrous
H
9

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

you can try it:

Hoskins answered 23/7, 2013 at 15:52 Comment(0)
I
8

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

Indenture answered 16/8, 2012 at 19:42 Comment(0)
D
6

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

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

Drynurse answered 9/1, 2013 at 21:16 Comment(0)
D
5

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:

Drewdrewett answered 27/4, 2010 at 5:21 Comment(1)
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.Melia
C
3

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

Chapen answered 30/12, 2017 at 21:11 Comment(0)
D
2

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

Divorcee answered 14/10, 2009 at 20:27 Comment(0)
I
2

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

Inapplicable answered 19/11, 2009 at 21:56 Comment(4)
@Inapplicable :) 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.Gony
@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.Inapplicable
Give that a try and see how it works. Look up how DNS works, and you'll understand why it's impossible.Gony
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.Endodontics
G
2

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.

Garrity answered 15/6, 2013 at 17:30 Comment(0)
U
1

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
Ulrikaumeko answered 14/10, 2009 at 20:17 Comment(0)
S
0

Why not using the literal IP address in the URL?

  • http://127.0.0.1/ (old IPv4)
  • http://[::1]/ (new IPv6)
Saltatory answered 14/10, 2009 at 7:2 Comment(1)
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.Loudish
M
-1

This domain resolves to 127.0.0.1:

www.mouse-potato.com

Martini answered 1/11, 2009 at 2:7 Comment(1)
But the question asks for a domain all of whose sub-hosts redirect to 127, not just www.Spicule
B
-1

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.

Bolick answered 19/11, 2009 at 21:54 Comment(1)
Probably valid at the time this comment was made, but the domain no longer points at localhost.Spicule
H
-1

I have set up my own that you can use:

home.pdobson.com resloves to 127.0.0.1

Hodeida answered 9/5, 2012 at 20:7 Comment(0)
S
-4

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

Shaynashayne answered 19/11, 2009 at 22:4 Comment(4)
I don't see why anyone downvoted this answer. This is the best answer here. What the OP is asking is impossible.Gony
Maybe because he says " I don't have control of DNS settings (hosts file or whatever) "?Endodontics
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 @Gony thinks the question is "impossible" since several people offered ways to accomplish the goal quite easily.Spicule
-1 because the title of the question includes "wildcard" which this answer will not solve.Dagney

© 2022 - 2024 — McMap. All rights reserved.