Surendra Sharma

Surendra Sharma

Search This Blog

Thursday, May 7, 2015

How to replace space by dash in URL in Sitecore

For the sack of SEO, it’s always a good practice to avoid any blank spaces in URL and replace them by dash (-).

It’s very easy to achieve this task in Sitecore. Just write below highlighted line just before closing tag of </encodeNameReplacements> in web.config file.

      <replace mode="on" find=" " replaceWith="-"/>
    </encodeNameReplacements>

That’s it. No programming needed.

You can use any other character also instead of dash.


Please leave your comments or share this code if it’s useful for you.

No comments:

Post a Comment