Public Wildcard Domain Name To Resolve To 127.0.0.1

SubdomainLocalhostDnsWildcard Subdomain

Subdomain Problem Overview


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.

Subdomain Solutions


Solution 1 - Subdomain

*.vcap.me

VMWare maintains this for their open cloud platform.

Solution 2 - Subdomain

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.

Solution 3 - Subdomain

Solution 4 - Subdomain

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

you can try it:

Solution 5 - Subdomain

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

Solution 6 - Subdomain

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

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

Solution 7 - Subdomain

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:

Solution 8 - Subdomain

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

Solution 9 - Subdomain

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

Solution 10 - Subdomain

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

Solution 11 - Subdomain

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.

Solution 12 - Subdomain

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

Solution 13 - Subdomain

Why not using the literal IP address in the URL?

  • http://127.0.0.1/ (old IPv4)
  • http://[::1]/ (new IPv6)

Solution 14 - Subdomain

This domain resolves to 127.0.0.1:

www.mouse-potato.com

Solution 15 - Subdomain

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.

Solution 16 - Subdomain

I have set up my own that you can use:

home.pdobson.com resloves to 127.0.0.1

Solution 17 - Subdomain

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser189422View Question on Stackoverflow
Solution 1 - Subdomainwhit537View Answer on Stackoverflow
Solution 2 - SubdomainRyan GibbonsView Answer on Stackoverflow
Solution 3 - SubdomainRoger PateView Answer on Stackoverflow
Solution 4 - Subdomainjoel1di1View Answer on Stackoverflow
Solution 5 - SubdomainnhanceView Answer on Stackoverflow
Solution 6 - SubdomainEsben von BuchwaldView Answer on Stackoverflow
Solution 7 - SubdomainloudejView Answer on Stackoverflow
Solution 8 - SubdomainBen LastView Answer on Stackoverflow
Solution 9 - SubdomainKarlView Answer on Stackoverflow
Solution 10 - SubdomainEarlzView Answer on Stackoverflow
Solution 11 - SubdomainJeromeView Answer on Stackoverflow
Solution 12 - SubdomainHafthorView Answer on Stackoverflow
Solution 13 - SubdomainbortzmeyerView Answer on Stackoverflow
Solution 14 - Subdomainuser187842View Answer on Stackoverflow
Solution 15 - SubdomainBilly FossView Answer on Stackoverflow
Solution 16 - SubdomainMrOodlesView Answer on Stackoverflow
Solution 17 - SubdomainCycloneView Answer on Stackoverflow