12

I know the .dev top-level domain requires all sites to support only encrypted HTTPS connections, disallowing any HTTP connections.

Are there other such TLDs?

16

A direct answer to this would eventually become outdated if more top-level domains start enforcing HTTPS using HTTP Strict Transport Security (HSTS, RFC 6797). Technically this is an HSTS policy of a TLD submitted to the preloading list. It started with Google's new TLDs,

The HSTS preload list can contain individual domains or subdomains and even top-level domains (TLDs), which are added through the HSTS website. The TLD is the last part of the domain name, e.g., .com, .net, or .org. Google operates 45 TLDs, including .google, .how, and .soy. In 2015 we created the first secure TLD when we added .google to the HSTS preload list, and we are now rolling out HSTS for a larger number of our TLDs, starting with .foo and .dev.

and there has even been preliminary thoughts on the possibility of protecting the entire .gov in the future:

Zooming out even further: it’s technically possible to preload HSTS for an entire top-level domain (e.g. “.gov”), as Google first did with .google. As a relatively small, centrally managed top-level domain, perhaps someday .gov can get there.

To know the current situation, one must consult the Chromium HSTS Preloaded list.

The preloaded list is also available on Chromium's GitHub mirror; especially the raw version is best for curl or wget. The list is a non-standard JSON with comment lines. It is possible to analyse it with jq after removing the comments with e.g. sed.

Here, the jq gives all domain names on the preloaded list and the grep reduces it into TLDs:

cat transport_security_state_static.json \
  | sed 's/^\s*\/\/.*//' \
  | sed '/^$/d' \
  | jq -r '.entries[]|select(.include_subdomains==true)|"\(.name)"' \
  | grep -P "^\.?[a-z]*\.?$" 

To search for public suffixes instead of TLDs:

cat transport_security_state_static.json \
  | sed 's/^\s*\/\/.*//' \
  | sed '/^$/d' \
  | jq '.entries[]' \
  | jq 'select((.policy=="public-suffix") and (.include_subdomains==true))' \
  | jq -r '"\(.name)"'
13
  • 2
    Great answer. One thing that may be worth considering in practice is whether one might want to match public suffixes also, rather than just the TLDs specifically asked about in the question. – Håkan Lindqvist Jun 20 at 10:25
  • 1
    @HåkanLindqvist Good point. I added an example search for that, too. – Esa Jokinen Jun 20 at 10:36
  • There is also hstspreload.org to look at current list content. – Patrick Mevzek Jun 21 at 6:14
  • 2
    It seems faster to get the file from the GitHub mirror with curl https://raw.githubusercontent.com/chromium/chromium/master/net/http/transport_security_state_static.json (or wget). – Esa Jokinen Jun 21 at 7:32
  • 1
    I find it unlikely that .gov will get onto the HSTS preload list in my lifetime. Government IT moves like a glacier, and you're talking about a few thousand little unconnected bureaucratic IT fiefdoms who are unlikely to have any incentive to do anything of the sort and probably not the budget either. – Michael Hampton Jun 21 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.