SEO Friendly Urls in Sitecore -Remove spaces in Url (3)

by aboo bolaky 11. August 2009 06:33

It's the third time I'm writing on this particular topic (The EncodeNameReplacements element in the web.config). Articles 1 and 2  have had their importance in building SEO-friendly links in Sitecore.

Double Encoding in Urls

Whilst doing some routine administrative tasks in sitecore, I noticed that some links were no longer working. I was pretty sure that those links were working before I did a publish. :( Back to the drawing board.

As outlined in Articles 1 and 2, I was using

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

in my web.config. It was working fine when sitecore items were having names like "Camera one" (->url: camera-one.aspx), "Camera one two three" (->url: camera-one-two-three.aspx) etc...

However, if an item name has a character that has already been defined in my EncodeNamesReplacements section, Sitecore throws you back on the Item Not Found page. In my situation, I had renamed the Sitecore Item :"John Doe" to "John-Doe" (lame administrative task...I KNOW) . The effect of this is that when the user clicks on the John-Doe.aspx, he/she is redirected to the default "Item Not Found" sitecore page. A careful look at the url has revealed that Sitecore was trying to request an item with a name of John--Doe and consequently failed.


or hack (for some people)

If you are using a specific character to get rid of spaces in url, you need to make sure that a cms user will not be able to create an item name having that character in. Easy way to factor this in is to include your character in the InvalidItemNameChars element in the web.config. In my implementation, I've changed that setting to :

<setting name="InvalidItemNameChars"


and that did the trick :)

Tags: ,

.Net | Applications | Sitecore


5/8/2010 3:28:48 AM #


thanks for sharing this information! it's very useful for a lot people try to understand how we can use this product.

vicky United States |

5/17/2010 5:09:40 PM #

Cheap Rolex watches

I would like to thank you for the efforts you had made for writing this awesome article.

Cheap Rolex watches People's Republic of China |

11/7/2011 11:14:21 AM #

Marrakech guide

You enjoy brought up a same impressive positions , thankyou for the inform. “The prominent motive is, that each husband be armed. … Each sole who is masterful might enjoy a pistol.” by Patrick Henry.

Marrakech guide France |

11/7/2011 1:09:37 PM #

visite Marrakech

Woh I like your satisfy , saved to darlings ! .

visite Marrakech France |

11/11/2011 6:28:28 PM #

credit immobilier

I am very pleased to find this web site.I wanted to thank you for your time to write this wonderful post! Definitely enjoying every bit of it and I checked to see new things to blog.

credit immobilier United States |

11/11/2011 6:29:30 PM #

pret immobilier

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.

pret immobilier United States |

11/11/2011 6:29:54 PM #

assurance prêt

Very useful blog! I really enjoyed reading it. So nice to read a blog that's written in proper way! I'll certainly be back again for more in the future. Thank you so much.

assurance prêt United States |

11/13/2011 10:15:47 AM #

Marrakech guide

Deference to condition founder , several grand choosy material . “When you desist to ideal you desist to reside.” by Malcolm Stevenson Forbes.

Marrakech guide France |

11/13/2011 12:14:49 PM #

visite Marrakech

Quality decipher, I ethical passed this onto a ally who was doing quantity inquiry on that. Plus he ethical bought me lunch as I establish it for him grin Thus permit me rephrase that: Thank you for lunch! “They may disregard what you said, still they inclination never disregard how you made them experience.” by Carl W. Buechner.

visite Marrakech France |

11/15/2011 9:56:06 PM #

assurance pret

I thought it was going to be boring and old site, but I'm glad when I visited, I will post a link to this page on my blog. I believe my visitors will find that very useful.

assurance pret United States |

11/15/2011 9:56:33 PM #

prêt immobilier

Hi, I would suggest you to continue posts, this would make your blog even more n more interesting and popular, and I guess you will get more.

prêt immobilier United States |

11/15/2011 9:57:34 PM #

crédit immobilier

It’s so amazing to gather information on the blog. I really loved reading these post. It has strengthen my faith more. You all do such a great job at such concepts.

crédit immobilier United States |

11/15/2011 11:15:53 PM #

immobilier au maroc

Unquestionably speculate that that you said. Your special excuse seemed to be at the lace the easiest constituent to enjoy in regard of. I pronounce to you, I indeed have irked at the homogeneous schedule as kindreds speculate affairs that they plainly don’t fulfill about. You controlled to jab the claw atop the surface furthermore too defined external the integral fad lacking having profile-fulfills , kindreds can select a outstanding. Desire liable be corroborate to have also. Acknowledges!

immobilier au maroc France |

11/16/2011 2:49:31 AM #

a6 immobilier maroc

As I website owner I comprehend the capacity here is tangible exquisite , looks for your struggles.

a6 immobilier maroc France |

Tag cloud

Flash Player 9 required.

About Me

I wish I could write something here..
//TODO: ElaborateMe