Surfing in hexadecimal
more from blah
Jun 2, 04

Got into a conversation today at work about dns and address translation, and we started messing around with ways to create strangely formed urls. Among our discoveries, we learned that you can specify a url as a hexadecimal number. The behavior works correctly in Mozilla Firefox, as well as some versions of Internet Explorer. To see if your browser works, try going to 0xd86d764d (you should see the Yahoo home page).

The breakdown is that the destination ip address is represented in the above hex number ("0x" denotes "hexadecimal number"), where each class of the ip is represented by a pair of hex digits. So 0xd86d764d is broken down as a hex ip address, namely d8.6d.76.4d. If you convert those individual hex numbers into decimal, you get 216.109.117.204 which resolves to www.yahoo.com.

You can also insert any other valid hex digits immediately after the initial "0x" and they will be ignored. Said another way, the last 8 hex digits are parsed as the address, and everything else is ignored. So 0xd86d764d should resolve to the same destination ip as 0x00099909adff8dd9d97900000000000d86d764d.

This brought up a silly discussion of hunting for web hosting providers by the coolness of the hex converted ip address. For instance, 0xdeadbeef (which translates to 222.173.190.239) would be ultra cool. You wouldn't even need a domain name anymore, you could just share your site location as the hex coded value. Think about it, no more domain registration fees!