Maximum length of DNS hostname and domain names

Last Modified: Tue, 11 Nov 2014 17:16:13 +0000 ; Created: Tue, 11 Nov 2014 17:16:13 +0000

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 -

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.