What is the maximum length of the 'name' part in a domain?
I'm referring to the google
in http://www.google.com
. How long can the google
part be without what's before and after it?
问题:
回答1:
Each label may contain up to 63 characters.
回答2:
"URI producers should use names that conform to the DNS syntax, even when use of DNS is not immediately apparent, and should limit these names to no more than 255 characters in length."
http://tools.ietf.org/html/rfc3986
"The DNS itself places only one restriction on the particular labels that can be used to identify resource records. That one restriction relates to the length of the label and the full name. The length of any one label is limited to between 1 and 63 octets. A full domain name is limited to 255 octets (including the separators)."
http://tools.ietf.org/html/rfc2181
回答3:
The full domain name may not exceed a total length of 253 characters in its external dotted-label specification.
http://en.wikipedia.org/wiki/Domain_Name_System
If you are getting anywhere close to 253 characters, I think you should look for a shorter domain name...
回答4:
As a demonstration, this website has a 63 characters domain name, the maximum allowed: http://63-characters-is-the-longest-possible-domain-name-for-a-website.com