Why are these urls without TLD permission on the webpage?

I noticed that ga url is allowed for website, but no TLD like .com, .org, etc. I wrote a script to test all 2 letter urls:

#!/bin/bash
for a in {a..z}
do
    for b in {a..z}
    do
        curl "$a$b" -s -m 10 >> foo.txt
        if [ -s foo.txt ]
        then
            cp foo.txt "$a$b.txt"
            rm foo.txt
            echo "$a$b"
        fi
    done
done

      

which prints

ai
dk
pn
to
uz

      

The script is not perfect (it doesn't recognize for example ga

), but it shows there are a few more of these urls. I noticed that these urls are all TLDs in their own right. Ai - Anguilla, dk - Denmark, etc. Why are these URLs "valid" in the sense that they resolve to an IP address and why do they exist?

(I would make them linkable by links, but oddly enough, the SO formatter won't accept them as valid.)

+3


source to share


2 answers


They don't have a TLD, they are a TLD.

If you control a top-level domain, you can add DNS resource records for the TLD itself, as well as for any of its subdomains (which will be second-level domains, or usually referred to as domains) and subdomains second-level domains (i.e., third-level domains) and etc.



Although it's not that common, some TLD holders make the TLD resolvable (eg to

TLD
: http://to/

or if your browser {or stack overflow editor;)} has problems with it, like the FQDN: http://to./ ).

A related server crash question: What does http: //www.http: //www.http: //www.http: //www.http: //www.hpf.com/? Hl = en look like.

+4


source


I think that just as a subdomain (i.e. subdomain.domain.com) is not required in order to make a URL resolvable, the domain itself is also not required as it is just a subdomain of the TLD. It's just that it is not really common practice to register a TLD with IP directly.



+1


source







All Articles