Every once in a while I stumble on a tool that doesn’t seem earth-shattering at the time, but quickly becomes an indispensable part of my developer arsenal. I have been using xip.io for a few months now, but just recently realized how integral it has become in my development workflow.
What is xip.io?
It’s wildcard DNS — or the absolute easiest way to setup a hostname without configuring DNS. Basically,
site.com.[IP Address].xip.io will resolve to
[IP Address], where
site.com is any hostname you choose.
No account to create or configuration files to setup. Xip.io is a free service provided by 37signals, creator of BaseCamp and Ruby on Rails.
What’s the point?
There are a number of practical uses for xip.io.
I use it most frequently to setup development environments on localhost. For example, to get to my localhost blog setup, I just visit
phil.me.127.0.0.1.xip.io. This is a much better solution than trying to develop everything in a directory under localhost. I have the flexibility to setup multiple virtual hosts, paths to resources (eg. CSS and JS) can be absolute from the domain root, and I don’t have to touch DNS records (which take time to propogate) or my hosts file.
Or, for all you web designers who have a closet full of iPhones, iPads, Android Phones, tablets, and every other mobile device ever created, use it for browser testing. No need to publish a site to a staging server, just fire up the mobile devices, connect to your private Wifi, and navigate to
http://site.com.10.0.0.1.xip.io/ (where 10.0.0.1 is the private IP of your development machine).
Scrap your hosts file and stop developing everything using localhost. Replicate your production environment as closely as possible in development by separating sites by hostname – with xip.io, it’s too easy not to.
xip.io | 37signals