{% extends "base.txt" %} {% block path %}dig/{{ data.query | urlencode_strict }}{% endblock %} {% set r = data.result.records %} {%- block content -%} # dig {{data.query}} via {{ data.result.used_dns_resolver }} {% 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 an IDN to generate the results below. ``` {{ idn.idn }} ``` {%- else -%} Your IDN would decode to ``` {{ idn.unicode }} ``` {%- endif -%} {% endif -%} {% set r = data.result.records -%} ## DNS Records {% if r.unkown_resolver %} {%- set show_nonpresent = false %} The resolver you chose is not one of the available ones. => {{ extra.base_url }}/dns_resolver {% elif r.invalid_name %} {%- set show_nonpresent = false %} This domain name does not conform to the dns specification (std3) rules and was therefore not resolved. => https://www.rfc-editor.org/info/std3 {% elif r.nxdomain %} {%- set show_nonpresent = false %} Our DNS-Server claims that this domain doesn't exist, there shouldn't be any results. {%- 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 %} ### CNAME This domain has a cname set, this means its contents are full replaced by the linked record. {{ 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: {%- for aname in r.aname -%} * {{aname}} {%- endfor -%} {% endif -%} {%- if r.a %} A (IPv4) records: {% for address in r.a -%} * {{ address }} {% endfor %} {%- elif show_nonpresent %} No A (IPv4) Records. {% endif -%} {%- if r.aaaa %} AAAA (IPv6) records: {% for address in r.aaaa -%} * {{ address }} {% endfor %} {%- elif show_nonpresent %} No AAAA (IPv6) Records. {% endif -%} {%- if not data.result.partial_lookup -%} {%- if r.mx %} MX (Mail Exchange) records: {% for mx in r.mx | sort(attribute="preference") | reverse -%} * {{ mx.preference }} {{ mx.exchange }} {% endfor %} {%- elif show_nonpresent %} No MX (Mail Exchange) records. {% endif %} {%- if r.soa %} SOA (Source Of Authority) records: {% for soa in r.soa %} * MName: {{soa.mname}} * RName: {{soa.rname}} * Serial: {{soa.serial}} * Refresh: {{soa.refresh / 60 | round(precision=2)}}m * Retry: {{soa.retry / 60 | round(precision=2)}}m * expire: {{soa.expire / 3600 | round(precision=2)}}h * minimum: {{soa.minimum / 60 | round(precision=2)}}m TTL {% endfor %} {%- elif show_nonpresent %} No SOA (Source Of Authority) records. {% endif %} {%- if r.ns %} NS (Name Server) records: {% for ns in r.ns -%} * {{ns}} {% endfor %} {%- elif show_nonpresent %} No NS (Name Server) records. {% endif %} {%- if r.caa %} CAA (Certification Authority Authorization) records: {% for caa in r.caa -%} * {{caa}} {% endfor %} {%- elif show_nonpresent %} No CAA (Certification Authority Authorization) records. {% endif %} {%- if r.txt %} TXT records: {% for txt in r.txt -%} * {{txt}} {% endfor %} {%- elif show_nonpresent %} No TXT records. {% endif %} {%- if r.srv %} SRV records: {% for srv in r.srv %} * Priority: {{srv.priority}} * Weight: {{srv.weight}} * Port: {{srv.port}} * Target: {{srv.target}} {% endfor %} {%- elif show_nonpresent %} No SRV records. SRV or Service records usually live on their own subdomains like {{ "_xmpp-client._tcp."~data.query }}. {% endif %} {%- else %}{# if data.partial_lookup #} To save resources the above is only a partial lookup. => {{ helper::dig_link(extra=extra, name=data.query) }} {%- endif -%} {% endblock %}