It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any top level domain below and any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!
127-0-0-1.org.uk
42foo.com
beweb.com
domaincontrol.com
feacebook.com
lacolhost.com
localhost.tv
localtest.me
- Also has an SSL cert - see http://readme.localtest.melocal.computer
local.sisteminha.com
- Managed by @tinogomeslvh.me
ortkut.com
ratchetlocal.com
smackaho.st
ulh.us
vcap.me
xip.io
- Managed by Sam Stephenson, Basecamp - see http://xip.io/yoogle.com
sources:
- http://www.fidian.com/programming/public-dns-pointing-to-localhost
- http://blog.reenhanced.com/post/29566591244/developing-with-subdomains-just-got-a-lot-easier
- https://stackoverflow.com/questions/1562954/public-wildcard-domain-name-to-resolve-to-127-0-0-1
- https://superuser.com/questions/1280827/why-does-the-registered-domain-name-localtest-me-resolve-to-127-0-0-1
- https://twitter.com/marcosbl/status/758425596959551488