Go bulk

Information, Documentation and stuff

If you are here, this probably means that you already know things about DNS and if not, I suggest you to read those articles : What is a domain name and what is behind the scene and 10 frequently asked questions about DNS solved with DIG, which are very complete and clear, written by a dear friend and colleague, Anouar ADLANI @aadlani.

How the backend rolls

The api used to run this service is the dnsruby gem.
If the result you're expecting when querying a specific name server for a record shows the AA flag as false, that's because the gem is using recursors - and therefore, don't expect authoritative answers.
By default, this machine uses google public nameserver infrastructure to resolve, using the name servers in this very specific order :
2001:4860:4860::8888, 2001:4860:4860::8844, 8.8.8.8, 8.8.4.4.
Yup, that's right, the IPv6 protocol is used by default to resolve dns records.

Using the API

If you want to integrate the JSON results to your webpage, you might want to read more about JSONP.

The full search (default query)

Method
GET
URL
http://dotnul.com/api/dns/:fqdn
Ouput
JSONP; example for http://dotnul.com/api/dns/dotnul.com:
{
    "dig": {
        "header": {
            "id": "24378",
            "qr": "true",
            "opcode": "Query",
            "aa": "false",
            "tc": "false",
            "rd": "true",
            "ra": "true",
            "ad": "false",
            "cd": "false",
            "rcode": "NOERROR",
            "qdcount": "1",
            "ancount": "13",
            "nscount": "0",
            "arcount": "1"
        },
        "answer": [
            {
                "name": "dotnul.com",
                "type": "A",
                "class": "IN",
                "ttl": 3600,
                "rdata": "88.190.215.224"
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "20 alt1.aspmx.l.google.com."
            },
            {
                "name": "dotnul.com",
                "type": "NS",
                "class": "IN",
                "ttl": 43200,
                "rdata": "ns2.eurodns.com."
            },
            {
                "name": "dotnul.com",
                "type": "NS",
                "class": "IN",
                "ttl": 43200,
                "rdata": "ns4.eurodns.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "30 aspmx4.googlemail.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "10 aspmx.l.google.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "20 alt2.aspmx.l.google.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "30 aspmx3.googlemail.com."
            },
            {
                "name": "dotnul.com",
                "type": "SOA",
                "class": "IN",
                "ttl": 43200,
                "rdata": "ns1.eurodns.com. hostmaster.eurodns.com. 2012080600 86400 7200 604800 86400"
            },
            {
                "name": "dotnul.com",
                "type": "NS",
                "class": "IN",
                "ttl": 43200,
                "rdata": "ns3.eurodns.com."
            },
            {
                "name": "dotnul.com",
                "type": "NS",
                "class": "IN",
                "ttl": 43200,
                "rdata": "ns1.eurodns.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "30 aspmx2.googlemail.com."
            },
            {
                "name": "dotnul.com",
                "type": "MX",
                "class": "IN",
                "ttl": 3600,
                "rdata": "30 aspmx5.googlemail.com."
            }
        ],
        "additional": [
            {
                "name": "",
                "type": "OPT",
                "class": "CLASS512",
                "ttl": 32768,
                "rdata": "no rdata"
            }
        ],
        "authority": [ ],
        "bind": ";; Answer received from 2001:4860:4860::8888 (358 bytes)\n;;\n;; Security Level : UNCHECKED\n;; HEADER SECTION\n;; id = 23403\n;; qr = true opcode = Query aa = false tc = false rd = true\n;; ra = true ad = false cd = false rcode = NOERROR\n;; qdcount = 1 ancount = 13 nscount = 0 arcount = 1\n\nOPT pseudo-record : payloadsize 512, xrcode 0, version 0, flags 32768\n\n;; QUESTION SECTION (1 record)\n;; dotnul.com.\tIN\tANY\n\n;; ANSWER SECTION (13 records)\ndotnul.com.\t43200\tIN\tNS\tns3.eurodns.com.\ndotnul.com.\t3600\tIN\tMX\t20 alt1.aspmx.l.google.com.\ndotnul.com.\t43200\tIN\tNS\tns2.eurodns.com.\ndotnul.com.\t43200\tIN\tNS\tns4.eurodns.com.\ndotnul.com.\t3600\tIN\tMX\t30 aspmx3.googlemail.com.\ndotnul.com.\t3600\tIN\tMX\t30 aspmx5.googlemail.com.\ndotnul.com.\t43200\tIN\tNS\tns1.eurodns.com.\ndotnul.com.\t3600\tIN\tMX\t30 aspmx4.googlemail.com.\ndotnul.com.\t3600\tIN\tMX\t30 aspmx2.googlemail.com.\ndotnul.com.\t3600\tIN\tMX\t10 aspmx.l.google.com.\ndotnul.com.\t3600\tIN\tA\t88.190.215.224\ndotnul.com.\t43200\tIN\tSOA\tns1.eurodns.com. hostmaster.eurodns.com. 2012080600 86400 7200 604800 86400\ndotnul.com.\t3600\tIN\tMX\t20 alt2.aspmx.l.google.com.\n"
    }
}

The host/type pair query

Method
GET
URL
http://dotnul.com/api/dns/:fqdn/:type
Ouput
JSONP; example for http://dotnul.com/api/dns/dotnul.com/A:
{
    "dig": {
        "header": {
            "id": "36729",
            "qr": "true",
            "opcode": "Query",
            "aa": "false",
            "tc": "false",
            "rd": "true",
            "ra": "true",
            "ad": "false",
            "cd": "false",
            "rcode": "NOERROR",
            "qdcount": "1",
            "ancount": "1",
            "nscount": "0",
            "arcount": "1"
        },
        "answer": [
            {
                "name": "dotnul.com",
                "type": "A",
                "class": "IN",
                "ttl": 3600,
                "rdata": "88.190.215.224"
            }
        ],
        "additional": [
            {
                "name": "",
                "type": "OPT",
                "class": "CLASS512",
                "ttl": 32768,
                "rdata": "no rdata"
            }
        ],
        "authority": [ ],
        "bind": ";; Answer received from 2001:4860:4860::8888 (55 bytes)\n;;\n;; Security Level : UNCHECKED\n;; HEADER SECTION\n;; id = 26285\n;; qr = true opcode = Query aa = false tc = false rd = true\n;; ra = true ad = false cd = false rcode = NOERROR\n;; qdcount = 1 ancount = 1 nscount = 0 arcount = 1\n\nOPT pseudo-record : payloadsize 512, xrcode 0, version 0, flags 32768\n\n;; QUESTION SECTION (1 record)\n;; dotnul.com.\tIN\tA\n\n;; ANSWER SECTION (1 record)\ndotnul.com.\t3340\tIN\tA\t88.190.215.224\n"
    }
}

The host/type pair query on a specific nameserver

Method
GET
URL
http://dotnul.com/api/dns/:nameserver/:class/:fqdn/:type
Ouput
JSONP; example for http://dotnul.com/api/dns/ns1.eurodns.com/IN/dotnul.com/A:
{
    "dig": {
        "header": {
            "id": "20319",
            "qr": "true",
            "opcode": "Query",
            "aa": "false",
            "tc": "false",
            "rd": "true",
            "ra": "true",
            "ad": "false",
            "cd": "false",
            "rcode": "NOERROR",
            "qdcount": "1",
            "ancount": "1",
            "nscount": "0",
            "arcount": "1"
        },
        "answer": [
            {
                "name": "dotnul.com",
                "type": "A",
                "class": "IN",
                "ttl": 3117,
                "rdata": "88.190.215.224"
            }
        ],
        "additional": [
            {
                "name": "",
                "type": "OPT",
                "class": "CLASS512",
                "ttl": 32768,
                "rdata": "no rdata"
            }
        ],
        "authority": [ ],
        "bind": ";; Security Level : UNCHECKED\n;; HEADER SECTION\n;; id = 20319\n;; qr = true opcode = Query aa = false tc = false rd = true\n;; ra = true ad = false cd = false rcode = NOERROR\n;; qdcount = 1 ancount = 1 nscount = 0 arcount = 1\n\nOPT pseudo-record : payloadsize 512, xrcode 0, version 0, flags 32768\n\n;; QUESTION SECTION (1 record)\n;; dotnul.com.\tIN\tA\n\n;; ANSWER SECTION (1 record)\ndotnul.com.\t3117\tIN\tA\t88.190.215.224\n"
    }
}