{% extends "base.html" %} {% import "helpers.html" as helper %} {% import "links.html" as links %} {% block title %}dig {{ data.query }}{% endblock %} {% block og_title %}dig {{ data.query }}{% endblock %} {% block h1 %}dig {{ helper::breadcrumb_domain(extra=extra, name=data.query) }} via {{data.result.used_dns_resolver}}{% endblock %} {% block og_path %}/dig/{{ data.query | urlencode_strict }}{% endblock %} {% block content %} {% if data.result.idn %} {% set idn = data.result.idn %}

Internationalized Domain Names

Because of some limitations the DNS has, Unicode characters need a special encoding.

{% if idn.original_was == "unicode" %}

Your Unicode query has been encoded as the IDN {{ idn.idn }} to generate the results below.

{% else %}

Your IDN would decode to {{ idn.unicode }}.

{% endif %}
{% endif %} {% set r = data.result.records %}

DNS Records

{% set show_nonpresent = true %} {% if r.unkown_resolver %}

The resolver you chose is not one of the available ones, if you can reproduce this error by just using the UI please report it.

{% set show_nonpresent = false %} {% elif r.invalid_name %}

This domain name does not conform to the dns specification (std3) rules and was therefore not resolved.

{% set show_nonpresent = false %} {% elif r.nxdomain %}

The DNS-Server claims that this domain doesn't exist, there shouldn't be any results.

{% set show_nonpresent = false %} {% elif r.timeout %}

There was at least one timeout error while resolving this domain, the results below are incomplete.

{% elif r.other_error %}

An error happened while resolving this name, the results below are incomplete. There was probably some IO issue, the error has been written to the log to help with debugging.

{% endif %} {% if r.dns_error %}

The DNS-Server returned an error code that is not NXDomain, the results are probably incomplete. To help with debugging this has been written to the log.

{% endif %} {% if r.cname %}

This domain has a CNAME set, this means its contents are full replaced by the linked record.

{{ helper::dig(extra=extra, name=r.cname[0]) }}

Usually you get the A and AAAA records for the linked record to avoid unnecessary requests. If anything else resolves, that is a violation of the DNS specification.

{% if r.cname | length > 1 %}

This domain resolves to multiple CNAMEs, this is not allowed by the DNS specification!

{% endif %} {% endif %} {% if r.aname %}

This domain has one or multiple ANAME (or ALIAS) records set that the DNS server communicates:

{% endif %} {% if r.a %}

A (IPv4) records:

{% elif show_nonpresent %}

No A (IPv4) Records.

{% endif %} {% if r.aaaa %}

AAAA (IPv6) records:

{% elif show_nonpresent %}

No AAAA (IPv6) Records.

{% endif %} {% if not data.result.partial_lookup %} {% if r.mx %}

MX (Mail Exchange) records:

{% elif show_nonpresent %}

No MX (Mail Exchange) records.

{% endif %} {% if r.soa %}

SOA (Source of Authority) records:

{% elif show_nonpresent %}

No SOA records.

{% endif %} {% if r.ns %}

NS (Name Server) records:

{% elif show_nonpresent %}

No NS (Name Server) records.

{% endif %} {% if r.caa %}

CAA (Certification Authority Authorization) records:

{% elif show_nonpresent %}

No CAA (Certification Authority Authorization) records.

{% endif %} {% if r.txt %}

TXT records:

{% elif show_nonpresent %}

No TXT records.

{% endif %} {% if r.srv %}

SRV records:

{% elif show_nonpresent %}

No SRV records.

SRV or Service records usually live on their own subdomains like {{ helper::dig(extra=extra, name="_xmpp-client._tcp."~data.query) }}. {% endif %} {% else %}{# if data.partial_lookup #}

To save resources the above is only a partial lookup.

Extended DNS Lookup for {{ data.query }}.

{% endif %}

Other Services

{{ links::domain_name_links(name=idn.idn|default(value=data.query))}}

Programmatic Lookup

If you want to look up this information in another program the short answer is don't, look up the names using your local DNS!

On most systems on the commandline you have commands like host and dig even when not present you can probably use ping as a workaround as it resolves the name and gives you the IP-Address it is pinging.

Why querying this service is still useful

This service most probably doesn't share its cache with your local resolver, this way you have a way to see if your DNS-change had the effect it should have.

It may also be useful for debugging other DNS problems or to get around a local resolver that is lying to you because your ISP is a something.

How?

You can choose between the html, text and json format.

An example of an URL could be: {{ extra.base_url }}/dig/example.org?format=json

{% endblock %}