- Published on
Domain Name Length Limits
- Authors
- Name
- hwahyeon
According to the DNS standard (RFC 1035), domain names have strict length rules:
Part | Limit | Notes |
---|---|---|
Entire domain name | Up to 253 chars | Includes dots (. ). Theoretical maximum is 255 bytes, but only 253 characters can be used safely. |
Each label | Up to 63 chars | A label is each part separated by dots, e.g., www , example , com . |
Why 253 and not 255?
- RFC 1035 defines the maximum domain name length as 255 bytes.
- However, this includes:
- 1 byte for the length field of each label
- 1 byte for the null terminator at the end
- This leaves 253 characters for the actual domain name.
Implication
- In theory, the number of subdomains is almost unlimited.
- The practical limit comes from the total domain length (253 chars).
- Example:
a.b.c.d.e.f...example.com
is valid as long as no label exceeds 63 chars and the whole stays under 253 chars.