{% 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 <code>{{ helper::breadcrumb_domain(extra=extra, name=data.query) }}</code>{% endblock %} {% block og_path %}/dig/{{ data.query | urlencode_strict }}{% endblock %} {% block content %} {% if data.result.idn %} {% set idn = data.result.idn %} <section> <h2>Internationalized Domain Names</h2> <p>Because of some limitations the DNS has, Unicode characters need a special encoding.</p> {% if idn.original_was == "unicode" %} <p>Your Unicode query has been encoded as the <i>IDN</i> <code>{{ idn.idn }}</code> to generate the results below.</p> {% else %} <p>Your <i>IDN</i> would decode to <code>{{ idn.unicode }}</code>.</p> {% endif %} </section> {% endif %} {% set r = data.result.records %} <section> <h2>DNS Records</h2> {% if r.nxdomain %} <p class="error box">Our DNS-Server claims that this domain doesn't exist, you shouldn't see any results below.</p> {% elif r.timeout %} <p class="error box">There was at least one timeout error while resolving this domain, the results below are incomplete.</p> {% elif r.other_error %} <p class="error box">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.</p> {% endif %} {% if r.dns_error %} <p class="error box">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.</p> {% endif %} {% if r.cname %} <p>This domain has a <code>CNAME</code> set, this means its contents are full replaced by the linked record.</p> <p class="button-paragraph">{{ helper::dig(extra=extra, name=r.cname[0]) }}</p> </p>Usually you get the <code>A</code> and <code>AAAA</code> records for the linked record to avoid unnecessary requests. If anything else resolves, that is a violation of the DNS specification.</p> {% if r.cname | length > 1 %} <p>This domain resolves to multiple <code>CNAME</code>s, this is not allowed by the DNS specification!</p> {% endif %} {% endif %} {% if r.aname %} <p>This domain has one or multiple <code>ANAME</code> (or <code>ALIAS</code>) records set that the DNS server communicates:</p> <ul class="link-list"> {% for aname in r.aname%} <li>{{ helper::dig(extra=extra, name=aname) }}</li> {% endfor %} </ul> {% endif %} {% if r.a %} <p id="a"><code>A</code> (IPv4) records:</p> <ul class="link-list"> {% for address in r.a%} <li>{{ helper::ip(extra=extra, ip=address) }}</li> {% endfor %} </ul> {% else %} <p>No <code>A</code> (IPv4) Records.</p> {% endif %} {% if r.aaaa %} <p id="aaaa"><code>AAAA</code> (IPv6) records:</p> <ul class="link-list"> {% for address in r.aaaa%} <li>{{ helper::ip(extra=extra, ip=address) }}</li> {% endfor %} </ul> {% else %} <p>No <code>AAAA</code> (IPv6) Records.</p> {% endif %} {% if not data.result.partial_lookup %} {% if r.mx %} <p id="mx"><code>MX</code> (Mail Exchange) records:</p> <ul class="link-list"> {% for mx in r.mx | sort(attribute="preference") | reverse %} <li>{{ helper::dig(extra=extra, name=mx.exchange, fqdn=true, prefix=mx.preference) }}</li> {% endfor %} </ul> {% else %} <p id="mx">No <code>MX</code> (Mail Exchange) records.</p> {% endif %} {% if r.soa %} <p id="soa"><code>SOA</code> (Source of Authority) records:</p> <ul> {% for soa in r.soa %} <li><dl class="box"> <dt>MName (Original Source)</dt> <dd>{{ helper::dig(extra=extra,name=soa.mname) }}</dd> <dt>RName (Responsible)</dt> <dd>{{ helper::dig(extra=extra,name=soa.rname) }}</dd> <dt>Serial</dt> <dd>{{soa.serial}}</dd> <dt>Refresh</dt> <dd>{{soa.refresh / 60 | round(precision=2) }}m</dd> <dt>Retry </dt> <dd>{{soa.retry / 60 | round(precision=2) }}m</dd> <dt>Expire</dt> <dd>{{soa.expire / 3600 | round(precision=2) }}h</dd> <dt>Minimum</dt> <dd>{{soa.minimum / 60 | round(precision=2) }}m</dd> </dl></li> {% endfor %} </ul> {% else %} <p id="soa">No <code>SOA</code> records.</p> {% endif %} {% if r.ns %} <p id="ns"><code>NS</code> (Name Server) records:</p> <ul class="link-list"> {% for ns in r.ns | sort %} <li>{{ helper::dig(extra=extra, name=ns) }}</li> {% endfor %} </ul> {% else %} <p id="ns">No <code>NS</code> (Name Server) records.</p> {% endif %} {% if r.caa %} <p id="caa"><code>CAA</code> (<a targt="_blank" href="https://de.wikipedia.org/wiki/DNS_Certification_Authority_Authorization">Certification Authority Authorization</a>) records:</p> <ul> {% for caa in r.caa %} <li><code>{{caa}}</code></li> {% endfor %} </ul> {% else %} <p id="caa">No <code>CAA</code> (<a target="_blank" href="https://de.wikipedia.org/wiki/DNS_Certification_Authority_Authorization">Certification Authority Authorization</a>) records.</p> {% endif %} {% if r.txt %} <p id="txt"><code>TXT</code> records:</p> <ul> {% for txt in r.txt %} <li><code>{{txt}}</code></li> {% endfor %} </ul> {% else %} <p id="txt">No <code>TXT</code> records.</p> {% endif %} {% if r.srv %} <p id="srv"><code>SRV</code> records:</p> <ul> {% for srv in r.srv %} <li><dl class="box"> <dt>Priority</dt> <dd>{{srv.priority}}</dd> <dt>Weight</dt> <dd>{{srv.weight}}</dd> <dt>Port</dt> <dd>{{srv.port}}</dd> <dt>Target</dt> <dd>{{ helper::dig(extra=extra,name=srv.target) }}</dd> </dl></li> {% endfor %} </ul> {% else %} <p id="srv">No <code>SRV</code> records.</p> <p><code>SRV</code> 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 #} <p>To save resources the above is only a partial lookup.</p> <p class="button-paragraph"><a href="{{ helper::dig_link(extra=extra, name=data.query) }}">Extended DNS Lookup for <code>{{ data.query }}</code>.</a></p> {% endif %} </section> <section> <h2>Other Services</h2> {{ links::domain_name_links(name=idn.idn|default(value=data.query))}} </section> <section> <h2>Programmatic Lookup</h2> <p>If you want to look up this information in another program the short answer is <b>don't, look up the names using your local DNS!</b></p> <p>On most systems on the commandline you have commands like <code>host</code> and <code>dig</code> even when not present you can probably use <code>ping</code> as a workaround as it resolves the name and gives you the IP-Address it is pinging.</p> <h3>Why querying this service is still useful</h3> <p>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.</p> <p>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 <i>something</i>.</p> <h3>How?</h3> <p>You can choose between the <code>html</code>, <code>text</code> and <code>json</code> format.</p> <p>An example of an URL could be: <code>{{ extra.base_url }}/dig/example.org?format=json</code></p> </section> {% endblock %}