A domain is considered valid if it satisfies all the below listed checks and measures. The domain name validator automatically checks the domain name inputted by user against all such specifications. These checks include:
Valid Characters: A host-name can only contain the English language letters (a-z), digits (0-9), hyphen (-) and dot (.). In addition to this a domain name can contain other characters such as underscore (_) and asterisk (*) for wildcard domains.
Hyphen: If present, hyphen cannot be used at the beginning and at the end of a label. Consecutive hyphens as 3rd and 4th characters are not permitted except for Internationalized Domain Name (IDN). Also, two consecutive hyphens are usually not permitted, but their validity can vary by TLD, thus relevant TLD guidelines should be checked for specific details.
Spaces and special characters: Spaces and special characters (such as !, $, &, _ and so on) are not permitted.
Top-Level Domain: There must be a valid Top-Level Domain (TLD) present. This validator checks the TLD against a list of 1591 TLDs (Updated 22nd May 2024)
Domains ending with Dot: Domain names with a dot (.) as the last character are considered valid.
Total Character Count: Total character count for a domain name, including TLDs and sub-domains (if present) cannot exceed 253 characters.
Label/ Levels/ Sub-domains: There cannot be more than 127 levels in a single domain, everything included. E.g., example.com has two levels.
Label Character Count: The total character count in an individual label must be between 1 and 63 characters.
References: RFC 1034, RFC 1035, RFC 2181