Hostname Character Limit

%3CLINGO-SUB%20id%3D%22lingo-sub-1068231%22%20slang%3D%22en-US%22%3EHostname%20Character%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1068231%22%20slang%3D%22en-US%22%3E%3CP%3EStill%20being%20limited%20to%2015%20characters%20for%20hostnames%20in%202019%20is%20very%20upsetting.%20In%20an%20age%20where%20we%20are%20deploying%20servers%20in%20multiple%20data%20centres%2C%20whether%20that%20be%20on%20premise%20or%20in%20the%20cloud%20and%20having%20multiple%20environments%20as%20well%20means%20trying%20to%20come%20up%20with%20sensible%20hostnames%20in%20just%2015%20characters%20is%20basically%20impossible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%E2%80%99m%20sure%20I%20am%20not%20the%20only%20person%20who%20is%20frustrated%20by%20this%20limit%20and%20would%20very%20much%20like%20it%20if%20Microsoft%20was%20to%20revisit%20this%20limit%20and%20increase%20it%20to%20bring%20it%20in%20line%20with%20the%20wonderful%20limit%20our%20Linux%20friends%20enjoy.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1068231%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EActive%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EManagement%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1068254%22%20slang%3D%22en-US%22%3ERe%3A%20Hostname%20Character%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1068254%22%20slang%3D%22en-US%22%3E%3CP%3EActually%20you%20can%20already%20have%20longer%20hostnames.%20In%20Server%202019%20and%20current%20Windows%2010%20Client%20Editions%20you%20can%20have%20much%20longer%20hostnames.%20You%20will%20still%20get%20a%20warning%20about%20NETBIOS%20though.%3C%2FP%3E%3CP%3EIf%20you%20choose%20a%20hostname%20longer%20than%2015%20characters%2C%20it%20will%20work%20without%20problems%20as%20long%20as%20you%20don't%20use%20any%20services%20that%20depend%20on%20NETBIOS.%20Windows%20will%20generate%20a%20shorter%2C%2015%20character%20name%20for%20NETBIOS%20and%20you%20will%20have%20a%20different%20NETBIOS-name%20than%20hostname.%20If%20you%20have%20no%20dependand%20services%20in%20use%2C%20or%20disabled%20NETBIOS%20entirely%20in%20your%20network%2C%20you%20can%20safely%20use%20longer%20hostnames.%20If%20you%20are%20unsure%20or%20you%20still%20use%20NETBIOS%20in%20your%20network%2C%20you%20should%20keep%20your%20hostnames%20to%2015%20characters%20or%20less.%3C%2FP%3E%3CP%3EThe%20limit%20is%20simply%20from%20the%20NETBIOS%20protocol%2C%20which%20has%20a%20limit%20of%2016%20bytes%20for%20the%20computername.%20The%20last%20byte%20in%20Windows%20networking%20is%20used%20for%20a%20service%20ID%2C%20hence%20the%2015%20byte%20(characters)%20limit%20on%20NETBIOS-compatible%20hostnames.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnyway%2C%20what%20you%20wish%20is%20already%20possible%2C%20so%20just%20use%20longer%20hostnames%20if%20you%20want%20to.%20If%20you%20still%20use%20older%20Windows%20versions%20that%20do%20not%20allow%20to%20exceed%20the%20NETBIOS%20naming%20limit%2C%20and%20longer%20names%20are%20important%20to%20you%2C%20you%20should%20consider%20upgrading%20to%20more%20current%20operting%20systems.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F490303%22%20target%3D%22_blank%22%3E%40LiamG14%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1068320%22%20slang%3D%22en-US%22%3ERe%3A%20Hostname%20Character%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1068320%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F261242%22%20target%3D%22_blank%22%3E%40dretzer%3C%2FA%3E%26nbsp%3BWhilst%20you%20are%20correct%20the%20issue%20is%20that%20Active%20Directory%20for%20example%20is%20still%20very%20much%20reliant%20on%20NETBIOS%20so%20whilst%20I%20can%20indeed%20have%20a%20hostname%20of%20over%2015%20characters%20that%20then%20isn%E2%80%99t%20going%20to%20match%20that%20of%20the%20computer%20account%20in%20Active%20Directory%20when%20bound%20to%20the%20domain.%20If%20as%20an%20example%20I%20have%20a%20hostname%20of%20dc1-prod-monitoring-01.foo.bar.com%20that%20would%20get%20shortened%20to%20dc1-prod-monito.foo.bar.com%20which%20is%20not%20ideal.%20If%20I%20deployed%20a%20second%20server%20with%20a%20hostname%26nbsp%3B%3CSPAN%3Edc1-prod-monitoring-02.foo.bar.com%20and%20Windows%20generates%20some%20other%20NETBIOS%20name%20in%20Active%20Directory%20its%20then%20difficult%20to%20determine%20which%20is%20which.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EWe%20need%20to%20be%20in%20a%20position%20where%20Active%20Directory%20as%20an%20example%20does%20not%20have%20a%20reliance%20on%20NETBIOS%20which%20would%20allow%20for%20a%20hostname%20of%20x%20number%20of%20characters%20to%20match%20that%20of%20the%20computer%20account%20that%20is%20created.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EMaybe%20I%20should%20have%20made%20the%20above%20clearer%20in%20my%20initial%20post.%20It%E2%80%99s%20not%20so%20much%20an%20issue%20with%20the%20hostname%20more%20NETBIOS%20and%20the%20reliance%20key%20services%20have%20on%20it%20still.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1496976%22%20slang%3D%22en-US%22%3ERe%3A%20Hostname%20Character%20Limit%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1496976%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20confirm%20on%20Windows%2010%20Pro%20for%20Workstations%202004%20that%20Windows%20does%20in%20fact%20allow%20hostnames%20%26gt%3B%2015%20characters.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%3Edifficult%20to%20determine%20which%20is%20which%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F490303%22%20target%3D%22_blank%22%3E%40LiamG14%3C%2FA%3EI%20do%20believe%20that%20when%20I%20set%20my%20long%20hostname%20on%20my%20new%20installation%20above%20a%20warning%20popped%20up%20showing%20the%20truncated%20NETBIOS%20name.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUPDATE%3A%20I%20discovered%20a%20rather%20unpleasant%20limitation%20to%20the%20above.%20I%20named%20my%20machine%20DellOptiPlex390MT-1%2C%20which%20worked.%20However%2C%20thanks%20to%20the%20NETBIOS%20limitation%2C%20Windows%20shortened%20that%20to%20DellOptiPlex390%20for%20network%20shares.%20Doesn't%20sound%20like%20a%20good%20idea%20for%20the%20share%20name%20and%20hostname%20to%20not%20match%2C%20%2B%20there's%20already%20a%20machine%20on%20my%20network%20with%20the%20*390%20as%20its%20hostname.%20So%20I%20guess%20I'll%20rename%20it%20to%20DellOptiPlexMT1%20instead%20since%20it's%20the%20only%20Dell%20OptiPlex%20MT%20I%20have%20that%20runs%20Windows.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Still being limited to 15 characters for hostnames in 2019 is very upsetting. In an age where we are deploying servers in multiple data centres, whether that be on premise or in the cloud and having multiple environments as well means trying to come up with sensible hostnames in just 15 characters is basically impossible.

 

I’m sure I am not the only person who is frustrated by this limit and would very much like it if Microsoft was to revisit this limit and increase it to bring it in line with the wonderful limit our Linux friends enjoy.

3 Replies

Actually you can already have longer hostnames. In Server 2019 and current Windows 10 Client Editions you can have much longer hostnames. You will still get a warning about NETBIOS though.

If you choose a hostname longer than 15 characters, it will work without problems as long as you don't use any services that depend on NETBIOS. Windows will generate a shorter, 15 character name for NETBIOS and you will have a different NETBIOS-name than hostname. If you have no dependand services in use, or disabled NETBIOS entirely in your network, you can safely use longer hostnames. If you are unsure or you still use NETBIOS in your network, you should keep your hostnames to 15 characters or less.

The limit is simply from the NETBIOS protocol, which has a limit of 16 bytes for the computername. The last byte in Windows networking is used for a service ID, hence the 15 byte (characters) limit on NETBIOS-compatible hostnames.

 

Anyway, what you wish is already possible, so just use longer hostnames if you want to. If you still use older Windows versions that do not allow to exceed the NETBIOS naming limit, and longer names are important to you, you should consider upgrading to more current operting systems.

 

@LiamG14 

Highlighted

@dretzer Whilst you are correct the issue is that Active Directory for example is still very much reliant on NETBIOS so whilst I can indeed have a hostname of over 15 characters that then isn’t going to match that of the computer account in Active Directory when bound to the domain. If as an example I have a hostname of dc1-prod-monitoring-01.foo.bar.com that would get shortened to dc1-prod-monito.foo.bar.com which is not ideal. If I deployed a second server with a hostname dc1-prod-monitoring-02.foo.bar.com and Windows generates some other NETBIOS name in Active Directory its then difficult to determine which is which.

 

We need to be in a position where Active Directory as an example does not have a reliance on NETBIOS which would allow for a hostname of x number of characters to match that of the computer account that is created.

 

Maybe I should have made the above clearer in my initial post. It’s not so much an issue with the hostname more NETBIOS and the reliance key services have on it still.

Highlighted

Can confirm on Windows 10 Pro for Workstations 2004 that Windows does in fact allow hostnames > 15 characters.

 

difficult to determine which is which

 

@LiamG14I do believe that when I set my long hostname on my new installation above a warning popped up showing the truncated NETBIOS name.

 

UPDATE: I discovered a rather unpleasant limitation to the above. I named my machine DellOptiPlex390MT-1, which worked. However, thanks to the NETBIOS limitation, Windows shortened that to DellOptiPlex390 for network shares. Doesn't sound like a good idea for the share name and hostname to not match, + there's already a machine on my network with the *390 as its hostname. So I guess I'll rename it to DellOptiPlexMT1 instead since it's the only Dell OptiPlex MT I have that runs Windows.