1

I was wondering if you could set a DNS (A type) that points a top-level domain to an IP address (e.g. https://com points to an 8.8.8.8). Is this possible?

1

Yes and no.

In the structure of the DNS hierachy there is nothing preventing this behaviour - however in order to do it you need control over the tld.

You can do this in a hosts file if you run your own dns, but you cant do it globally for .com as you dont own it. If you have a lot of money you could get a vanity tld and do this for that tld.

Thinking of this there is one common place this fairly universally happens - but not through DNS - "localhost" is typically bound to 127.0.0.1 using a hosts file.

3
  • 1
    Owning a top level domain does cost "a lot of money." To put a number on it, it would be north of $100,000 (USD) just for the application fee. Plus you have to meet a whole host of ICANN requirements. See Can I create a top level TLD? (.michael for instance) on ServerFault. – Stephen Ostermiller Mar 25 at 19:18
  • 1
    Even if you did own a TLD, there might be ICANN rules against resolving the top level domain to an IP address. I'm not aware of any top level domain (including the vanity ones) that resolves to an IP address currently. I'd think that if it were allowed, some TLD would be doing it. – Stephen Ostermiller Mar 25 at 19:19
  • 1
    @StephenOstermiller "there might be ICANN rules against resolving the top level domain to an IP address" There is indeed, right into the agreement between ICANN and registries. Of course that doesn't apply to ccTLDs, with a dozen of them doing it... – Patrick Mevzek Mar 25 at 20:57
3

It is possible (if you control the TLD obviously), and it exists, but only in non ICANN controlled TLDs, which are gTLDs.

For gTLDs, ICANN - to block any new instance of the past SiteFinder issue - disallows records that are basically not NS, and A/AAAA only for glues needed, and related maintenance ones (DNSSEC). In theory that would even prohibit generic TXT records.

In ccTLDs, everything is possible, because technically an A record at apex is nothing special. I touched it already at my own answer at https://stackoverflow.com/a/49022087/6368697 but in short:

  • it exists, https://dk/ being a widely known example that does not seem to work anymore right now, but you can try https://ai/ for example because dig ai. A +short returns 209.59.119.34
  • Wikipedia has a list of other examples (I need to find it again)
  • See RFC 7085 "Top-Level Domains That Are Already Dotless" (December 2013) for a listing of all "dotless" cases (at that time), such as .DK, but they were 15 more. And even more if you count replies for MX DNS type.
  • SAC-053 from ICANN gives the reasoning against "dotless" domains (explaining they may fail to work because of broken applications/configurations basically)
  • ICANN contracts with registry at https://newgtlds.icann.org/sites/default/files/agreements/agreement-approved-31jul17-en.html#exhibitA.1 specifically list which records and content can appear at apex; note how A and AAAA are missing from the list except indirectly with the mention of "glues"
3
  • 1
    https://dk/ doesn't work for me. dig dk. doesn't give an A record with an IP address for me. – Stephen Ostermiller Mar 26 at 8:26
  • When I entered https://dk/ it didn't resolve to an IP address. I assume I'm just using the wrong DNS servers for this though. – Tyler Selden Mar 26 at 11:32
  • 1
    So they removed that "feature" recently then, let me edit the answer with another example. Do note however that browsers do all kind of funky stuff with names, and some can interpret "short" names as keywords and do a search or like in the past some automatically added .com at the end in some cases. – Patrick Mevzek Mar 26 at 14:58

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.