Vulnerability in EPiServer.Forms
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 .
Is there a way to do this, without programming an extension?
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?
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.
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?
Nothing built in, you'll have to add a little code yourself.
Ah ok. Thanks for the answer :)
Hi, 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?
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: http://www.frederikvig.com/2009/11/specify-your-preferred-external-url-in-episerver/
There is a commercial plugin that will handle canonicals, 404s and various redirects for you: http://www.mogul.com/en/web/products/seo-manager/seo-manager-for-episerver
(This is installed through EPiServer Deployment Center, so you won't have to make any code changes manually).
So if I show this page: http://www.frederikvig.com/2009/11/specify-your-preferred-external-url-in-episerver/, the operator will understand what do do?
If by "operator" you mean the people who developed your web site, then yes they should be able to fix it.