Skip to content
January 13, 2021 / kiranpatils

SXA Lower case URL


As per SEO Best practice, We were trying to set all URLs to lower case for our SXA Solution.

Based on my NON-SXA Learning. I thought it will be changed in one place. But it had changed at one more place. Which I couldn’t locate easily from the documentation. So, thought to share with you to save your time!


We made following change:

But that didn’t give us the desired results. A quick search helped us to find this post which outlines a few approaches: (Thank you!)

We tried following config file and it worked!

<?xml version="1.0"?>
<configuration xmlns:patch="">
<add name="localizedProvider">
<patch:attribute name="lowercaseUrls">true</patch:attribute>
view raw LowerCase.Config hosted with ❤ by GitHub
<!– Take redirectType="Temporary" out of production if needed – Current live site has same configuration –>
<rule name="LowerCaseRule – not including querystring" stopProcessing="true">
<match url="(.*)" />
<add input="{PATH_INFO}" pattern=".*[A-Z]" ignoreCase="false" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(sitecore)" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(sitecore modules)" negate="true" />
<add input="{REQUEST_URI}" pattern="^/-/" negate="true" />
<add input="{REQUEST_URI}" pattern=".*(-/media).*" negate="true" />
<add input="{REQUEST_URI}" pattern=".*(~/media).*" negate="true" />
<add input="{REQUEST_URI}" pattern=".*(~/icon).*" negate="true" />
<add input="{REQUEST_URI}" pattern="WebResource.axd" negate="true" />
<add input="{REQUEST_URI}" pattern="ScriptResource.axd" negate="true" />
<add input="{REQUEST_URI}" pattern="jsnlog.logger" negate="true" />
<add input="{REQUEST_URI}" pattern="Telerik.Web.UI.WebResource.axd" negate="true" />
<add input="{REQUEST_METHOD}" matchType="Pattern" pattern="POST" ignoreCase="true" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(identity)" negate="true" />
<action type="Redirect" url="/{ToLower:{R:1}}" appendQueryString="true" redirectType="Temporary" />

One more thing — If you are also looking for a way to redirect any URL to lower case then this is a great post: – I had to modify it for Identity service – Added our version (Tested on Sitecore 9.3) in the gist above.

Happy SEO!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: