Developer · Validator
Hostname & FQDN validator.
Check a hostname or fully qualified domain name against the label, length and character rules, and see exactly which rule failed. Runs in your browser; nothing is sent anywhere.
Input
Result
Enter a name and press Validate.
The hostname rules this tool checks
Characters: each label uses letters, digits and hyphens only (RFC 952, RFC 1123 section 2.1). Case does not matter.
Label edges: a label must start and end with a letter or digit. RFC 1123 section 2.1 relaxed RFC 952 to allow a leading digit, so 3com.com is fine.
Label length: 1 to 63 octets (RFC 1035 section 2.3.4).
Name length: at most 253 characters in dotted text form, which is 255 octets on the wire once each label's length byte and the root are counted (RFC 1035 section 2.3.4, RFC 3696 section 2). A trailing dot is optional and not counted.
Top-level label: must not be all digits (RFC 3696 section 2), so a name can never be confused with a dotted-decimal IP address (RFC 1123 section 2.1).
Why underscores fail
DNS itself puts no limit on the bytes in a label (RFC 2181 section 11), so a name like _sip._tcp.example.com (SRV) or selector._domainkey.example.com (DKIM) is a legal DNS owner name. Those underscore labels are service and key markers, not host names. Host-name syntax is the stricter rule, and an underscore breaks it, so this tool reports the underscore rule when it sees one.
ASCII only: an internationalised name must be converted to its punycode (xn--) form before checking. This tool does not do that conversion.
Sources: RFC 952; RFC 1123 section 2.1; RFC 1035 section 2.3.4; RFC 2181 section 11; RFC 3696 section 2.
Frequently asked questions
Can a hostname contain an underscore?
Not under the host-name rules. DNS records may use underscore labels (SRV, DKIM, DMARC and similar), but a machine hostname or a website name should not.
Is a trailing dot valid?
Yes. example.com. is the absolute form of the name. This tool accepts one trailing dot and does not count it toward the 253-character limit.
Why is a name ending in digits rejected?
The last label cannot be all-numeric. example.123 fails, while 123.example.com passes.
Does a valid result mean the domain exists?
No. It only means the name is well formed. This tool cannot look up DNS, so it cannot tell whether the name resolves or is registered.
Syntax check only
This tool checks hostname format only. It cannot confirm that a name resolves, is registered or is reachable, and it does not validate top-level domains against the public suffix list.