contact us.
call us.
join us.
we respect your data
At Sagittarius, we want to share our passion and excitement for digital. By providing your details you agree to be contacted by us.
We will treat your personal data with respect and you can find details in our Privacy Statement - this includes:
- What information do we collect about you
- How will we use the information about you
- Access to your information and correction
call us.
join us.
win with us.
We exist to make your business thrive and our greatest reward is our returning clients. Our focus is and always will be on our clients and not on industry awards and accreditations, which could account for why we’ve won so many of them…
Sitecore and SEO .

Richard Brisley
We have a superb in house SEO team, so when I attended my first Sitecore certification I was keeping an ear out for things that I thought would lead to problems.
One issue that stood out in the training was that a single page can have multiple URLs. You don't need to be an SEO coding God to know that multiple URLs are bad.
Create a new page in Sitecore called “Sample Item“ it can be accessed using these URLs out of the box.
/en/Sample%20Item.aspx
/Sample%20Item.aspx
/en/Sample%20Item
/Sample%20Item
having four version would be bad enough but it gets worse. The urls can vary by case as well so “Sample” is different to “SaMple”. So each url gains two versions for every letter in the item name.
The first thing to do is before even starting the build is to update the linkManager tag.
<linkManager defaultProvider="sitecore">
<providers>
<clear/>
<add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="false" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="asNeeded" languageLocation="filePath" lowercaseUrls="false" shortenUrls="true" useDisplayName="false"/>
</providers>
</linkManager>
Make sure that languageEmbedding is set to “always” or “never”. The built in link manager has an annoying habit when using asNeeded to swap between the /en or normal prefixed URLs. LowercaseUrls should be set to true so that when links are generated they are always lower cased. Another issue as you may have noticed in the URLs above is that Sitecore allows spaces in URLs and then encodes them as %20. You can get around this by patching encodeNameReplacements.
<encodeNameReplacements>
<replace mode="on" find=" " replaceWith="-" />
</encodeNameReplacements>
The above changes will help make sure that the in built URL generation will output URLs which are consistent. Of course if you are using a custom URL generator then the above changes might be ignored. Also it doesn't mean that if you manually type an invalid URL into a browser or those URLs are in the wild it will not fix the issue.
To ensure that the multiple URLs are converged you will need a Sitecore processor. Here is an example.
using Sitecore;
using Sitecore.Links;
using Sitecore.Pipelines.HttpRequest;
using Sitecore.Web;
using System.IO;
using System.Web;
public class InvalidUrlProcessor : HttpRequestProcessor
{
public override void Process(HttpRequestArgs args)
{
var Request = args.Context.Request;
var Response = args.Context.Response;
if (!IsValidContextItemResolved()
|| args.LocalPath.StartsWith("/sitecore")
|| RequestIsForPhysicalFile(args.Url.FilePath))
return;
var item = Context.Item;
string ItemUrl = LinkManager.GetItemUrl(item);
string CurrentUrl = Request.RawUrl;
if (ItemUrl != CurrentUrl)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", ItemUrl);
Response.End();
}
}
protected virtual bool IsValidContextItemResolved()
{
if (Context.Item == null)
return false;
return !(Context.Item.Visualization.Layout == null
&& string.IsNullOrEmpty(WebUtil.GetQueryString("sc_layout")));
}
protected virtual bool RequestIsForPhysicalFile(string filePath)
{
return File.Exists(HttpContext.Current.Server.MapPath(filePath));
}
}
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor patch:before="*[@type='Sitecore.Pipelines.PreprocessRequest.DeviceSimulatorResolver, Sitecore.Kernel']"
type="InvalidUrlProcessor, ClassLibrary1">
</processor>
</httpRequestBegin>
</pipelines>
</sitecore>
</configuration>
want to speak to one of our experts?

Richard Brisley
In 2016 and again in 2019 Richard was recognise in the BIMA 100 awards for his outstanding work in Tech, his passion for digital and his contribution to the industry.