Query DNS via a RESTful HTTP interface
dig.jsondns.org
dig.jsondns.org
If you want to debug it more easily in a browser, you can install the JSONView Firefox extension. It's quite handy: https://addons.mozilla.org/en-US/firefox/addon/10869
This was still present in IE7, but they may have fixed it in IE8.
Sending application/json to older versions of IE can cause it to pop up Save As dialogs, even in AJAX requests.
They did the same thing with application/xml+xhtml.
root@haven:~# host -t txt dkim1._domainkey.grepular.com dkim1._domainkey.grepular.com TXT "k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDwe0CGlJQq6Y0poniuhn80rsC1kKrcVg19STXqgM8wxe4HidRjr8KfSfCo0wcgqVq8saqsB0JCt2WOquRlUG5qRtrZag6G/wpYkRYCjYm8VsaJDxNZFpiauXeyz9HGKkHTo2QxLVIYFzkSo7ZtRQNnUB1N12/v5BscLk6X1DlmawIDAQAB"
root@haven:~# host -t srv _sip._tcp.grepular.com _sip._tcp.grepular.com SRV 10 0 5060 voip.grepular.com root@haven:~#
Not just underscores. You can shove almost anything in the hostname part of a dns lookup...
http://dig.jsondns.org/IN/2.0.0.127.zen.spamhaus.org/A
Yet doing the lookup using my own DNS server:
root@haven:~# host -t a 2.0.0.127.zen.spamhaus.org 2.0.0.127.zen.spamhaus.org A 127.0.0.2 2.0.0.127.zen.spamhaus.org A 127.0.0.4 2.0.0.127.zen.spamhaus.org A 127.0.0.10 root@haven:~#
It's also part of a larger project to make it trivial to work with DNS from "the web". Soon your web server will also be a DNS server.
Why?
Hosted DNS solutions cost money, don't always support all record types, and rarely have programmatic interfaces.
In short, it'll make my life easier. Hopefully yours too.
FTFY
I presently use a free service (http://gratisdns.dk) and also run bind9 for one domain (the free service can act as my backup NS) — I looked at http://cr.yp.to/djbdns.html in my quest for something simpler, but I wasn’t swayed.
Your comment made me optimistic, but correct me if I am wrong, but dig.jsondns.org is completely unrelated to any of this — what I would need is http://github.com/jpf/eventdns and dig.jsondns.org is more of a test server for EventDNS if I am not mistaken?
Is http://dig.jsondns.org for demonstration only or can we use that as an official deployment to use in our apps?
Thanks!
I just can't make any guarantees regarding response time or uptime. If you need guarantees for either of those, you can run the service yourself, the code is on github: http://github.com/jpf/jsondns
HTTP Status Codes also map pretty nicely to DNS RCODEs.
Non-cached (non recursive) queries are part of the standard that I'm coding towards. I just haven't implemented them yet.