Ian Leader: I came across a great entry on the immensely diverse ‘Make’ blog to day:
MAKE: Blog: Wikipedia over DNS.
David Leadbeater created a service that distributes Wikipedia entries over DNS using TXT records. Simply looking up a TXT record for any subdomain of his service will pull a summary of the Wikipedia entry for the title of the same name.
The idea is pretty simple (like all great ideas), and works like this: DNS is basically a giant directory service – normally our computers use it to look up particular kinds of information that make the internet work, the most well known being:
- MX records: what server should I connect to, in order to deliver mail for a particular domain (like jayeyesea.com)
- ALIAS records: how to find the numeric IP address that is required for your browser to load a web address like http://blog.jayeyesea.com
DNS servers tend to work in much the same way, with much the same features (this is probably a good thing, as the internet would stop working badly if they didn’t all answer standard queries in the same way). But I’ve often wondered if they could be used to do more.
David Leadbeater exploits the fact that there is a TXT record type and uses it to return summaries from Wikipedia. The instructions on the Make blog and David’s site only work on UNIX. If you’re using a PC, do the following:
- open a command window by typing Windows-R (or Start Menu->Run), then typing: cmd <return>
- type: nslookup -type=TXT <query>.wp.dg.cx
For example, here’s what happens when you replace <query> by jay:
C:\Documents and Settings\ianl>nslookup -type=TXT jay.wp.dg.cx Server: UnKnown Address: 192.168.1.1 Non-authoritative answer: jay.wp.dg.cx text = "The jays are several species of medium-sized, usually colorful and nois y, passerine birds in the crow family Corvidae. The names jay and magpie are som ewhat interchangeable, and the evolutionary relationships are rather complex. Fo r example, the Eurasian " "Magpie seems more closely related to the Eurasian Jay than to the Orien tal Blue and Green Magpies, whereas the Blue Jay is... http://a.vu/w:Jay" C:\Documents and Settings\ianl>
Very, very clever, but probably not particularly useful in practice – but it did make me think about how customised DNS servers might help improve search of particular websites: supposing I know that I want to find something about a particular company, e.g. data tariffs at Vodafone UK. I’ve got a number of options:
- Go to vodafone.co.uk and use their search box
- Go to a search engine and type in ‘data tariffs Vodafone UK’ – then click through to one of the results on the Vodafone UK web site
- Go to google and seach for ‘tariffs -site:vodafone.co.uk’
What if instead, I could type tariffs.vodafone.co.uk into the address bar of any browser, and it would automatically perform a search for ‘tariffs‘ on Vodafone’s web site? Instead of programming the browser to do this, you could do it using a combination of DNS and web server configuration:
- The DNS server would be configured to return the IP address of www.vodafone.co.uk for any unknown requests such as tariff.vodafone.co.uk, nokia.vodafone.co.uk, (<anything>.vodafone.co.uk)
- The web server would be configured to interpret requests to any unknown web addresses (like tariff.vodafone.co.uk) by redirecting the user to a search for this term (or if they so desired, a page that corresponds to this particular item)
I’ll let you judge how clever an idea this is, but I’ll be the first to admit that it’s not all that useful. More and more people aren’t typing URLs into address bars any more, but simply typing queries into a multi-purpose text entry box like Chrome’s address bar. Maybe 5 years ago, this would have made a big difference, but I can’t see a really good reason for it now.
So I wonder – is there a really good use for DNS beyond it’s original role of network directory service for the internet?
Post a comment and let us know!
Update: One of the free local newspapers here in Zurich, 20 Minuten, uses this approach where they’ve got an on-line follow-on to a story in the printed paper, e.g. www.check-in.20min.ch or www.film.20min.ch. It works without the ‘www’ as well (I’d be interested in why they decided to print it with the ‘www’ in the first place).
the only thing that makes sense with this approach is a version of .tel dns solution. ie using DNS to append phone, address, etc. Instead of the flawed approach of everyone fighting over a .tel space to be the only vodafone.tel, existing domains could provide a quick, easy and definitive way to provide key info – phone.domain.com, office.domain.com, compliance.domain.com etc. could all respond with the registered office address, contact details etc.
It could be a gadget app rather than needing a browser open to just find a phone number.