Canonical URLs

Sitefinity CMS keeps track of each content item and the default page where it is displayed. This way, Sitefinity CMS knows the URL of each item at any time, regardless of whether the item is published or saved as draft. This is called Canonical URL service. It makes possible for you to preview an item, as it will appear on the website, even before the item is published. Also, each item, at any time has one default page associated with it, therefore its URL is always known.

PREREQUISITES: The default location of an item must be a page that is accessible by all users, that is, they have permissions to view it.

Content items are displayed on pages using widgets. Each type of content item has one or more widgets used to display it. For example, events are displayed on the website using the Events widget. A page is associated with a content item when you drop the respective widget on the page. 

EXAMPLE: You create three events, but you have no page where you have added the Events widget. These events do not have a default page, because they are not displayed anywhere on the site. You cannot preview the events, because Sitefinity CMS does not know where they will be displayed. You cannot know their exact URL, because it depends on the page where they will be published. 
When you create a page and add the Events widget on the page, this page automatically becomes the default page for the events that you have created. If you, however, configure this Events widget to display only one of the three created events, this page becomes default only for the event that it displays. For example, you can use categories to narrow the displayed events. If you create a second page, which also contains the Events widget, you can set manually, which is the default page for the events, using priorities.

PREREQUISITES: Before you configure default pages for content items, you must configure canonical URLs service.
For more information, see Administration: Enable and disable Canonical URLs service.

Configuring the default pages

You can configure default pages on content type level. 

To view and configure the default pages for all content items of a particular type, perform the following:

  1. Open the page for the content type.
    For example, open the Events page.
  2. In the lower-right corner of the page, click Pages where <Content type name> are published.
    For example, Pages where Events are published.

    You can see a page, displaying all pages where the respective widget is dropped and configured to display the content type.
    For example, all pages that contain the Events widget.

  3. To set the priority, click the Actions link of a page and use the Up or Down functions.
    The page on the top is the one with highest priority. The page with highest priority is the default page.

    For example, if two pages are configured to display all events, the default page for all events is the page whit the higher priority. However, if you have two pages, of which one is configured to display only events from Sports category and the other – only events from Business category, the default page for events with Category set to Sports will be the first page and for the business events will have the second page, even if you have set the first page with higher priority.

NOTE: The default page for a content item is the page with the highest priority, where this item is displayed. If there is a page with higher priority that has the respective widget, but is not configured to display the content item, it is not set as its default page.

NOTE: If you have multiple sites, and the content items of one site are displayed on pages of another site, these pages also appear on the list of default pages for the items and you can set their priority. For more information about multiple sites and multiple data sources, see Create sites.

For example, if you configure the provider for events of site A to be also the provider for the events in site B and you create a page that has the Events widget in site B and this widget is configured to display the events created in site A, when you go to site A and open the page with the list of default pages for events, the page from site B will also be present in the list and you can set it as page with highest priority. This way, an event from site A can open by default on a page from site B.

Previewing an item and viewing its default pages

You can preview an item in one of the following ways:

  • On the home page of the content type, click Actions link of the respective content item and then click View.
  • When you are creating or editing a content item, in the toolbar, click Preview.

The item opens in its default page. If the item is not displayed anywhere on the site and does not have a default page, you cannot view or preview it.

When you open an item for editing, you can view the pages where it appears by expanding Pages on the right. The page on the top of the list is the default page for the item.

Scope of Canonical URLs

Content types that are covered by the feature are:

  • News
  • Event
  • Blog Post
  • Image
  • Video
  • Document & File
  • List Item
  • Ecommerce Products
  • Dynamic content types
  • Forums posts are only partially covered by the feature – they have canonical meta tags inserted, but the preview is not available for them.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?