Out of curiosity, does anyone know what's the maximum length (in characters) for a domain name?

Let's exclude the http://www.

I know the maximum length of an url is about 2000 chars. But here I'm more ineterested in just the domain part or the url.

On Wikipedia they say: "The full domain name may not exceed a total length of 253 characters in its external dotted-label specification." But what does that mean?

  1. 253 characters is the maximum length of full domain name, including dots: e.g. www.example.com = 15 characters.

  2. 63 characters in the maximum length of a "label" (part of domain name separated by dot). Labels for www.example.com are com, example and www.

This is an example of the domain with longest possible label (a fully working website BTW): http://www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com/. The domain name length = 71 characters.

This will be an example of longest domain name: abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcde.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com


It depends on what you want to do with the domain really.

For a domain just used as a website, the limit is 255 characters. Source: RFC2821 (April 2001) established this and RFC5321 (October 2008) retained this standard. To quote both of them... Domain

The maximum total length of a domain name or number is 255 characters.

For a domain that works with emails, the limit is 253 characters. Source: See the requirements of local-parts (i.e., the user in user@example.com) from RFC821 (August 1982), page 29. This limit is imposed because the to field in e-mails cannot exceed 255 characters, one of those characters must be @, and the local-part must be at least one character long (i.e., a@(253-character-domain), which hits the SMPT 255 to-field limit).

Not the answer you're looking for? Browse other questions tagged or ask your own question.