brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: dig HTTPS example.com shows the HTTPS record browsers can look up

Dig
~/tips/tip-dns-dig-https-record

dig HTTPS example.com +short

Queries the HTTPS record type that tells browsers how a site can be reached.

Browsers can do more than ask for an A record. They can also ask for an HTTPS record, which can tell them how to reach a site, for example that it speaks HTTP/3, before a connection is made.

RFC 9460 defines the SVCB record type and the HTTPS record type that goes with it. dig can query it like any other type:

dig HTTPS example.com +short

The answer has a priority, a target name and a set of parameters. The RFC’s examples show the form 1 . alpn=h2,h3: priority 1, a dot as the target, and an alpn parameter that lists the protocols the endpoint supports. In ServiceMode the dot means the target is the name you asked about. A priority of 0 is AliasMode, which points the name to another name instead. An empty answer just means the domain publishes no such record.

If your copy of dig does not know the name HTTPS, ask by number. The RFC gives the HTTPS type as 65, and the dig manual says any record type can be written as TYPEnn:

dig TYPE65 example.com +short

The output of an older dig then comes back in the generic format of RFC 3597, which is a row of hex instead of readable parameters.

I use this when a site moves behind a new provider and I want to see what a browser can find. The caveat: it does not replace the A and AAAA records. A client that does not use the HTTPS record ignores it, so the address records stay in place, and a wrong record in your own zone can send clients to a target that does not work.

Further reading: RFC 9460: SVCB and HTTPS resource records, dig manual

Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get

More Dig tips dig +noall +answer DS example.com dig nope.iana.org @9.9.9.9 | grep -E 'status|SOA' dig +search nas dig @8.8.8.8 www.google.com +subnet=203.0.113.0/24 dig +yaml example.com A All Dig tips (36) All topics

Link