Comment

Comment by sirn

I found its internal working quite interesting:

    $ dig 127.0.0.1.xip.io
    ;; ANSWER SECTION:
    127.0.0.1.xip.io.     403     IN     CNAME     9zlhb.xip.io.
    9zlhb.xip.io.         405     IN     A         127.0.0.1
Returning CNAME pointing to some record? Apparently, 9zlhb is a base 36 of integer of 1.0.0.127.

    ip:      1.0.0.127
    dec:     16777343
    base 36: 9zlhb
I guess they decided to reverse the IP address to make generated CNAME scale better (in number of characters):

                base 36   reverse base 36
    1.0.0.0     9ZLDS     1
    10.0.0.1    2RVXTT    9ZLE2
    127.0.0.1   Z8KFLT    9ZLHB
parent sirn 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton