1
$\begingroup$

We know an valid IPv4 address is each part not greater than 255, so, will 256.256.256.256 be considered a valid hostname rather an IP address?

I'm just curious how devices in various parts of the internet treat this kind of hostname?

$\endgroup$
5
  • $\begingroup$ en.wikipedia.org/wiki/Hostname#Syntax, en.wikipedia.org/wiki/Fully_qualified_domain_name#Syntax $\endgroup$
    – D.W.
    Commented Feb 19, 2022 at 0:54
  • $\begingroup$ @D.W., it took more than trivial scrutiny to get the answer from those links. The simple answer is that ICANN bans all-numeric TLDs, therefore 256.256.256.256 should be parsed as an invalid IP address, not as a host name under the TLD .256. $\endgroup$
    – Steve
    Commented Feb 19, 2022 at 10:21
  • $\begingroup$ @Steve, that sounds great -- thank you for doing that research! Can I encourage you to write that as an answer, so we can upvote it, and so this question will be treated as answered? $\endgroup$
    – D.W.
    Commented Feb 19, 2022 at 19:06
  • $\begingroup$ @Steve: Isn't 256.256.256.256 relative to the local search-domain? It would only be a host in the 256 TLD if it were 256.256.256.256., or am I mistaken? I.e. if my local search-domain is set up to be xyz.local, then a lookup for 256.256.256.256 would, at some point in the lookup algorithm, also try to resolve 256.256.256.256.xyz.local, which is not an all-numeric TLD, and thus could succeed if I have set up that particular record in my name server. $\endgroup$ Commented Feb 26, 2022 at 9:57
  • $\begingroup$ @JörgWMittag, I'm not sure to be honest. My understanding (which is not expert in this area) is that before you even get to the point of looking up a DNS record, you have to establish whether a domain name has even been given by the user, or merely an IP address given (which requires no lookup on the name server, because it isn't a name). $\endgroup$
    – Steve
    Commented Feb 26, 2022 at 10:37

1 Answer 1

2
$\begingroup$

As Steve has already pointed out ICANN bans all numeric TLDs. One can find a list of valid TLDs here at IANA.

This could be the end of this question but if one scrolls all the way down on this wikipedia article one can find TLDs which are in fact not managed or tracked by either ICANN or IANA. While Wikipedia is a bit nebulous how they exactly work they provide their respective TLDs so I tried looking up the one that did not have a fixed URL and found something.

You only need a DNSSEC which does not technically require a TLD that is registered with IANA. So you could register 256.256.256.256 as a "legit" URL

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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