The SEO tab in EPiServer ETF

The SEO tab in EPiServer is available for all page types when using ETF. This post explains the details of how the ETF SEO properties work.

  • 26 May 2011
  • 0

The SEO tab is available for all page types

When using ETF all page types inherit the PageTypeBase class in one way or another (all page type base classes in ETF inherit PageTypeBase).

One thing added by the PageTypeBase class is the SEO tab:

Screenshot of the SEO tab

Properties included on the SEO tab

The SEO tab contains the following page type properties:

  • Title
  • Description
  • Keywords
  • Author
  • Copyright
  • EnableIndexing
  • EnableLinkFollowing

Screenshot of the SEO tab

The edit captions for these can be overriden like for any page type property in the EPiServer language files. ETF by defaults ships with embedded translations for english and swedish.

SEO properties are rendered by the Master Page

All master pages should inherit the MasterPageBase class in ETF. Among other things this ensures that SEO properties are automatically rendered.

For example, the page type properties as specified in the screenshot above would result in the following markup inside the <head> tag of our page:

<title>About us</title>
<meta name="description" content="Quite often a company is described as delivering specific products or services. However, much can be gained from presenting a company in a more personal way, in effect describing the sort of culture and attitude inherent in the company." />
<meta name="keywords" content="presentation,company,culture,attitude" />
<meta name="author" content="John Doe" />
<meta name="copyright" content="Acme Inc." />
<meta name="robots" content="index,follow" />

(Additional meta tags removed for clarity.)

SEO properties default values

SEO properties can be set either 1) explicitly by the editor or 2) by defaulting to other relevant page type properties.

If an SEO property hasn’t been set by the editor, ETF will set the property value according to a fallback property.

  • Title defaults to PageName
  • Description defaults to MainBody (where applicable)
  • Keywords defaults to Tags

Author, Copyright, EnableIndexing, and EnableLinkFollowing do not have any fallback. The EnableIndexing and EnableLinkFollowing properties are set to true by default.

A note on the Description property

When the Description property defaults to the MainBody property it does so by stripping out all HTML tags and shortened to 160 characters.

So, if we have this in our MainBody property…

Screenshot of TinyMCE

…the default fallback for the Description property will be this:

Screenshot of Description property

How default values are updated

A default value will be updated if a page is modified and the previous default value hasn’t been changed. The following example demonstrates this:

If an editor creates a new page and sets its name…

Screenshot of edit tab

…the editor might not realize that the Title property (if left empty) has been set to its default value, which is the page name:

Screenshot of Title property on SEO tab

Now, if the editor edits the page name

Screenshot of updated page name

…the Title property will also be updated to reflect the updated page name:

Screenshot of updated Title property

However, if we set the Title property explicitly to make it differ from the page name…

Screenshot of explicitly specified page title

…we can update the page name

Screenshot of page name property

…without affecting the Title property:

Screenshot of Title property after modifying the page name