Posted on 26/03/2026 16:56:38
The standard product URL slug in DW10 is generated from Product.Meta.Url if it has a value — otherwise from Product.Name (see ShopUrlDataProvider.cs).
That value is then passed through UrlHelper.SanitizeUrl(..., true) when the URL node is created.
How the slug is generated
In practice, the algorithm does roughly this:
- Trim and lowercase
- If
LatinNormalize is enabled, apply mappings like:
æ → ae, ø → oe, ö → oe, å → aa, ß → ss, ª → a, µ → u, º → o
- Remove remaining diacritics
- Replace whitespace and certain characters with
-:
- space, NBSP,
?, =, &, #, ,, ., \, +, ½
- Replace
/ with - (because product URLs call SanitizeUrl(..., true))
- Collapse repeated
-
- Keep only letters and digits
- Trim leading/trailing
-
If two full URLs collide, Dynamicweb automatically appends -1, -2, etc. (see UrlIndex.cs).
Recommended approach
If you want to match the built-in behavior, don’t reimplement the logic — just use the helper
Important caveats
- Don’t regenerate on every save
Only set Meta.Url when it’s empty. Otherwise, changing the product name later will also change the slug.
- URLs can still change
Even with a fixed slug, the full product URL may change if the product’s group path changes (since group segments are part of the URL).
- High volume mode
If HighVolumeProductUrls is enabled, a different URL scheme is used (see ProductUrlQuerystringProvider.cs).