Maximum length of a domain name without the http:/

2019-03-14 06:05发布

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?

标签: url dns max
4条回答
仙女界的扛把子
2楼-- · 2019-03-14 06:16

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

查看更多
做自己的国王
3楼-- · 2019-03-14 06:22

Each label may contain up to 63 characters.

查看更多
可以哭但决不认输i
4楼-- · 2019-03-14 06:30

"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

查看更多
虎瘦雄心在
5楼-- · 2019-03-14 06:30

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...

查看更多
登录 后发表回答