We have a Sitecore 9.1.1 site with SXA 1.8.1. We're getting duplicate results in analytics because the urls will appear there with and without the \en part. We only have 1 language in the site.

I have since patched the Sitecore link provider and our custom one to have languageEmbedding="never".

We have the always strip language set to true - and the description to me sounds like it should be stripping out the language code from the url.

<setting name="Languages.AlwaysStripLanguage" value="true"/>

We also have a canonical url now dynamically generated for each page.

Should this be sufficient for analytics to stop showing the duplicate /en entries? Or is further action required?

It seems like someone could go to the site url with /en and it will be logged to analytics as that duplicate - although all the internal links should never have that language code.

  • 1
    Wait for Google cache update for your website.
    – Anton
    Commented Jul 9, 2019 at 6:25
  • 1
    And if someone has bookmarked a page?
    – Jen
    Commented Jul 9, 2019 at 6:45

2 Answers 2


First of all, make sure that all internal links are generated correctly, without /en/

What about external links(someone added your page to bookmarks, google cached URL, etc.): You can create rewrite rule that will remove en language from your URL:

<rule name="Remove en from URL" stopProcessing="true">
  <match url="^(en)/(.*)$" />
  <action type="Redirect" url="/{R:2}" />

It will avoid duplication in analytics. But be aware of side effects: redirects are often not too good for SEO.


Not sure if my answer is relevant but I'll post if it helps anyone. In Sitecore 9+ Site Definition plays a part to show the language set in it. Do check the language property in your site definition file. For example if you don't want your website to append the language in url then you better don't specify that property at all. Refer the code snippet below:

<site name="Name" patch:before="site[@name='website']"
        renderingParametersCacheSize="10MB" />

This definition will not specify the language in url.

  • This isn't influencing the language, if your link settings are to add the language to the url 'asNeeded' this isn't going to change it. Commented Sep 13, 2021 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.