www.rodneybeede.com "I would love to change the world, but they won't give me the source code" - unknown
 Navigation

Maximum length of DNS hostname and domain names - Last Modified 2014-11-11 17:16 UTC - Created 2014-11-11 17:16 UTC

Great explanation from the "The Old New Thing" MSDN blog. What is the real maximum length of a DNS name? - 12 Apr 2012 7:00 AM - http://blogs.msdn.com/.

253 characters. The encoding requires the length of each label to be encoded (typically where each . goes). The first label and the root (end) label take 2 octets from the 255 octet (not character) maximum. US ASCII leaves you with 253 characters (including the dots in the middle which are lengths).

Of course if you have a DNS entry in UTF-8 then things are different.