...
The Url List editor section
The image below shows the url list editor section when openedWhen set up, the editor shows an editor section for managing urls for all appropriate content types. You can add or delete a url as normal with a list editor. The url itself is entered, then a selection is made from:
- Main: This can only be selected once in the list. When this is selected, the primary url to access the content item is the given one, not the 'natural' one given by the data route template. Within Lynicon, references to the url of the item will return the primary url. While it is still possible to view the content item on the 'natural' url, the page markup has a canonical link to the given url.
- Canonical: The page can be accessed additionally on the url supplied, however it has a canonical tag pointing to the 'natural' url
- 301: Accessing the url listed results in a 301 redirect to the natural url
- 302: Accessing the url listed results in a 302 redirect to the natural url
Adding Canonical meta to page templates
This is done with a line or Razor as follows:
Code Block | ||
---|---|---|
| ||
<link rel="canonical" href="@Url.Canonical()" /> |