Live data from Hacker News

Xip.io - a magic domain name that provides wildcard DNS for any IP address

xip.io

1–10 of 128 posts

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#8
post #6
post #4

Hmm... Why wouldn't I just type the IP in?

Because then you can only serve one site from that address. With this you could serve as many different sites as you want based on the first part of the domain name.

Ah, for virtual hosts, got it. Thanks.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#10
post #6
post #4

Hmm... Why wouldn't I just type the IP in?

Because then you can only serve one site from that address. With this you could serve as many different sites as you want based on the first part of the domain name.

To expand on this, this problem can usually be solved by editing /etc/hosts. But you can't do that on some platforms such as iOS.

By the way, a neat trick is to assign an alias to your network interface in order to avoid the trouble of DHCP giving you a different IP address each time you connect. For example, on Mac OS X:

  $ sudo ifconfig en1 alias 10.99.99.99 netmask 255.0.0.0
This address will only be reachable from hosts that have a route to it, which can be achieved for example by also giving them an alias on the same subnet. Still, comes in handy at times.

(Obviously you want to be sure you're using a vacant address.)

(And of course, when you have control over the DHCP server there are more elegant ways of achieving this, such as binding your MAC to a static IP address.)

Edited for clarity.

Post reply on HN