Posts

Serve a website directly out of DNS


$ORIGIN    example.com.

@          CNAME serv.from.zone.
serv       TXT   "body>h1{Hello, World!}"

https://en.wikipedia.org/wiki/Zone_file

View the docs.

But... why?

Mostly this is a fun little gimmick. The theory is pretty interesting though. Maybe browsers could short-circuit DNS queries/responses by rendering what's in a special DNS record (SERV record perhaps?), skipping an additional web server query and all the latency that causes. Theoretically, something like this might halve the time it takes to render a site. It's a fun idea to entertain.

Naturally people might question the reliability of serv.from.zone as a web host. Feel free to serve it yourself.

Praise the sun