Try our conversational search powered by Generative AI!

Canonical URLs - how?


I want to add/control canonical URLs in my Episerver installation. When using the Simple Address information you can use a canonical URL on one page. But I have three pricelists which all contains the same content (but different left menus). The two duplicates fetches data from the original one, which I want to use as a canonical url for the other pages (the duplicates).

If I try to use the same simple address twice or three times, it brings up an error saying:

”Simple address for this page” with value ”producttype/prices” is already in use by Prices [8739].

Is there a way to do this, without programming an extension?

Jun 14, 2012 10:12

I am not entirely sure what you are trying to achive here. Why would you like to have three pages with the same url?

But in any case there is no way you can specify the same canonical url for three pages. How would the CMS know what page out of the three to redirect the user to?


Jun 15, 2012 12:47

You're using the canonical URL for specify the main page out of the three for search engines, to make sure you don't any penalties in your search ranking?

What I would probably do is see if the page I'm on is fetching data from another page, if it is then use the LinkUrl or SimpleUrl of that page and write it out in the canonical meta tag. Let me know if you need some example code.


Jun 15, 2012 12:51

Claus: The three pages don't get the same URL by using simple url. The only difference when using it is the canonical URL.

Frederik: Correct. That is exactly how I want to use this. The two duplicates do fetch the data from the original one. But is there a way to set this up directly in Episerver or do I have to access the files "manually" and add/change the code?

Jun 18, 2012 8:27

Nothing built in, you'll have to add a little code yourself.

Jun 18, 2012 11:23

Ah ok. Thanks for the answer :)

Jun 18, 2012 11:48

So how do I install this function on Episerver Cms6? I don't want to do it manually, like typing the the html code. I just want to type in the address on the edit page and then it will be automatically a Canonical. Do you understand my question?

May 14, 2013 10:54

As Frederik Vig writes above, EPiServer does not handle canonical URLs by default, you have to add this functionality manually in code.

It's not a big operation, but requires you to edit your aspx page and the codebehind file. Frederik has an example of this on his blog:

There is a commercial plugin that will handle canonicals, 404s and various redirects for you:

(This is installed through EPiServer Deployment Center, so you won't have to make any code changes manually). 

May 14, 2013 11:41

So if I show this page:, the operator will understand what do do?

May 15, 2013 10:40

If by "operator" you mean the people who developed your web site, then yes they should be able to fix it.


May 15, 2013 10:46
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.