phpvalidationdns

Number in the top-level domain?


Can top-level domains contain a number at the end? Idk nothing about DNS rules etc but when I try to use PHP's filter_var() function with FILTER_VALIDATE_EMAIL for test@null.com1 it returns true.


Solution

  • Conceptually, there is nothing that disallows numbers in a TLD and in the future, who knows, perhaps there will be numeric TLDs.

    There are no TLDs at the moment that do have numbers in them - the function probably does not test against a list of known TLDs (as it is subject to change), but lexically.