amiry jd
amiry jd

Reputation: 27605

the maximum amount of characters in a domain name

What the maximum amount of characters a domain name can be? What about a Url? Is there any differences between ASCII and non-ASCII characters? So thanks

Upvotes: 1

Views: 408

Answers (1)

aadlani
aadlani

Reputation: 661

If you have a fully qualified domain name like www.example.com:

  • each parts between dots, named labels, must be less than 63 octets
  • the whole FQDN, including dots, must be less than 255 octets

Those limits are described in the RFC 1035 section 2.3.4

For an full ASCII domain name, this means an 1 octet = 1 character.

Concerning the non-ASCII domain there is a notation named International Domain Name (IDN) which uses Punycode to convert the Unicode to ASCII, and prefixed by the ASCII Compatible Encoding xn-- (ACE) to differentiate it with standard labels. It is the resulting string that is being used for comparison with the limits.

example:

The IDN www.école.com is converted to www.xn--cole-9oa.com (20 characters)

Concerning the URL limits, please refer to the popular thread on stackoverflow "What is the maximum length of a URL?"

Upvotes: 1

Related Questions