Wildcard DNS for any IP address
Any IP address, as a hostname.
Put an IP address in a name under dev.buildzilla.co.uk and it answers with that address. There's nothing to sign up for or install, and nothing to set up first.
myapp.10.0.0.1.dev.buildzilla.co.uk → 10.0.0.1
Examples
| Name | Answers with |
|---|---|
10.0.0.1.dev.buildzilla.co.uk | 10.0.0.1 |
myapp.192.168.1.20.dev.buildzilla.co.uk | 192.168.1.20 |
shop.staging.192.168.1.20.dev.buildzilla.co.uk | 192.168.1.20 (any number of names in front) |
myapp-192-168-1-20.dev.buildzilla.co.uk | 192.168.1.20 (dashes keep it to one label) |
myapp.178.62.121.62.dev.buildzilla.co.uk | 178.62.121.62 |
How to use it
- Find the IP address of the machine your app runs on: a server's public address, or a computer on your own network (like
192.168.1.20). - Write it into a name, with dots or dashes, and add
.dev.buildzilla.co.uk. You can put any name in front to tell apps apart:blog.192.168.1.20.dev.buildzilla.co.uk,shop.192.168.1.20.dev.buildzilla.co.uk. - Use that name wherever you'd use a domain: in your browser, in a web server's config (for name-based virtual hosts), or in an app's settings.
Why not just the IP?
Many things need a name: web servers that host several sites on one address, cookies, OAuth callbacks, and apps that refuse bare IP addresses.
In BuildZilla
Subdomain routes get addresses like myproject.178.62.121.62.dev.buildzilla.co.uk automatically. Open one and you're on your project.
Try it
From a terminal on any computer:
dig +short myapp.178.62.121.62.dev.buildzilla.co.uk nslookup myapp.178.62.121.62.dev.buildzilla.co.uk
Both should print 178.62.121.62.
Good to know
- IPv4 only. Names without an address in them, or with one that isn't valid (
999.1.1.1), don't exist. - Answers for dev.buildzilla.co.uk only. It isn't a public resolver: questions about any other domain are refused.
- Nothing is stored. It works the answer out from the name itself, and doesn't keep a log of the names people look up.
- HTTPS: a name gives you somewhere to point a browser. A certificate for it is up to whoever runs the app.
A private address doesn't resolve at home? Some routers and filtering DNS services hide answers that point into your own network ("DNS rebinding protection"). Allow
dev.buildzilla.co.uk in the router's settings, or use a public resolver such as 1.1.1.1.