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. Links last checked 2026-10-26.
Worked example
3com.com is valid: 2 labels, 8 characters, and a label may start with a digit since RFC 1123 section 2.1.
my_host.example.com is not: Underscore is not allowed in a host name (RFC 952, RFC 1123 s2.1, RFC 3696 s2).
example.123 is not: The last label "123" is all digits. The top-level label must not be all-numeric (RFC 3696 s2), otherwise the name reads as an IP address (RFC 1123 s2.1).
Common mix-ups
-
Often assumedA hostname has to start with a letter, so 3m.example.com cannot be valid.
What the source saysRFC 1123 section 2.1 changed the RFC 952 rule: the restriction on the first character is relaxed to allow either a letter or a digit, and host software must support it. [1]
-
Often assumedAn all-number dotted name such as 1.2.3.4 is just another valid hostname.
What the source saysRFC 1123 says a name can start with a digit, but a valid host name can never have the dotted-decimal form #.#.#.# because at least the highest-level label will be alphabetic. [1]
-
Often assumedUnderscores are allowed in host names, since I see them in DNS names.
What the source saysThe RFC 952 grammar for a name allows letters, digits and hyphens, beginning with a letter and ending with a letter or digit, and RFC 1123 changes only the first-character rule. An underscore is not part of it. [2]
- RFC 1123: Requirements for Internet Hosts, section 2.1 (RFC Editor)
- RFC 952: DoD Internet Host Table Specification (RFC Editor)
Checked against these sources on .
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.