Windows Server Summit 2024
Mar 26 2024 08:00 AM - Mar 28 2024 04:30 PM (PDT)
Microsoft Tech Community
LIVE

Hostname Character Limit

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

6 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 

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

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.

verification of prerequisites for domain controller promotion failed server due to netbios number should be change
domain is having numbers and characters , netbios is not accepting, how can we fix this
Please suggest thanks in advance

@jdrch  I noticed on a Windows 10 Pro machine when joining domain it has a limit when you type domain name. Weird ??

That's exactly what I was referring to in the UPDATE section of my previous comment.