https://jameswillia.ms/posts/shortest-urls.html [ ] [ ] James Williams [ ] * Home * Contact * Blog + Short URLs * Guitar Tabs Menu Shortest URLs on the Internet Table of Contents Shortest URLs on the Internet August 29, 2022 What's the shortest URL for which content is served on the internet? There are quite a few single-letter second-level domains that are used in very short URLs, such as Google's http://g.co or Facebook's https://m.me. But we can go shorter than this: there's nothing stopping TLD registry operators serving A records at the apexes of their TLD zones. For example, if Verisign (the operator of the com TLD registry) wished, they could add an A record at the apex of the com TLD zone - com would then resolve to that IP, and your browser would connect to that IP when you visited https://com. Does any registry operator actually do this though? Surprisingly, the answer is yes. --------------------------------------------------------------------- First, let's find a list of TLDs which have A records. $ wget https://data.iana.org/TLD/tlds-alpha-by-domain.txt $ tld-a-records.tsv where get_a_record_tsv.sh is: #!/usr/bin/env bash set -euo pipefail name="$1" records=$(dig +short @8.8.8.8 "$name" | head -n1) echo -e "${name}\t${records}" Now, let's get the TLDs that have A records: $