Skip to content
Home » How to Disable Language Embedding in URLs and Sitecore Links

How to Disable Language Embedding in URLs and Sitecore Links

In this tutorial let’s learn about How to Disable Language Embedding in URLs and Sitecore Links. Because Sitecore is a CMS that supports various languages, the resulting URL and Sitecore links will have a language associated to them, for example (‘en’,’en-US’, etc.). We’ll look at How to Disable Language Embedding in URLs and Sitecore Links in this tutorial.

The majority of Sitecore settings may be changed without writing any additional code. We can easily stop language embedding in Sitecore by modifying the <linkManager> section of web.config, where the language Embedding option is enabled.

<linkManager defaultProvider="sitecore">
  <providers>
    <clear />
    <add name="sitecore" type="Sitecore.Links.LinkProvider,
    Sitecore.Kernel" addAspxExtension="true"
    alwaysIncludeServerUrl="false" encodeNames="true"
    languageEmbedding="never"
    languageLocation="filePath" lowercaseUrls="false"
    shortenUrls="true" useDisplayName="false" />
  </providers>
</linkManager>

The language Embedding options are:

  • asNeeded (default)
  • always
  • never

Changing the configuration to use languageEmbedding=”never” will prevent the language from appearing in the URL, while languageEmbedding=”always” will compel the language to appear in the URL at all times.

Similar Posts:

How to get MD5 checksum in PowerShell