SPSite.MaxWebNameLength field

Represents the maximum number of characters that can be used in site names for the site collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public const int MaxWebNameLength

The value of this constant is 256.

The MaxWebNameLength field is static and cannot be called on an instance object. To call this field, use SPSite.MaxWebNameLength.