📚 Product Knowledge
Seo
📖 Docs

SEO - Search Engine Optimization in Optimizely CMS 12

Exam Area: Content Area 1 – Product Knowledge (15%)
Reference: https://docs.developers.optimizely.com/content-management-system/docs/search-engine-optimization


1. Built-in SEO Features

Optimizely CMS provides built-in SEO features:

Built-in SEO Properties:

PropertyDescription
PageNamePage name (Name in Page tree)
PageURLSegmentURL slug of the page
PageTitleHTML <title> tag
PageDescriptionMeta description
PageKeywordsMeta keywords
PageVisibleInMenuShow in navigation menu
PagePeerOrderOrder in the page tree
ExternalURLRedirect URL

2. Friendly URLs

CMS automatically generates friendly URLs based on:

Customizing URLs:

// URL segment is automatically generated from PageName
// Editors can change it in the "All Properties" view

// In code, use:
var url = _urlResolver.GetUrl(contentReference);

3. Canonical URLs

// In the base layout view
<link rel="canonical" href="@Request.GetDisplayUrl()" />

4. Robots and Sitemap

Robots.txt:

Sitemap:

// Get all published pages to generate a sitemap
var allPages = _contentRepository.GetDescendents(ContentReference.RootPage);

5. Meta Tags in Templates

@* Layout view *@
<head>
    <title>@Model.CurrentPage.PageTitle ?? Model.CurrentPage.PageName</title>
    <meta name="description" content="@Model.CurrentPage.PageDescription" />
    <meta name="keywords" content="@Model.CurrentPage.PageKeywords" />
    
    @* Open Graph *@
    <meta property="og:title" content="@Model.CurrentPage.PageTitle" />
    <meta property="og:description" content="@Model.CurrentPage.PageDescription" />
</head>

6. URL Rewriting and Redirects

// Permanent redirect (301)
// Use ExternalURL property or custom redirect rules

// In appsettings.json
{
  "EPiServer": {
    "CMS": {
      "CanonicalUrlType": "Https"
    }
  }
}

7. Hreflang for Multilingual SEO

@* In Layout, add hreflang for multilingual *@
@foreach (var lang in Model.AvailableLanguages)
{
    <link rel="alternate" 
          hreflang="@lang.LanguageID" 
          href="@Url.ContentUrl(Model.CurrentPage.ContentLink, lang)" />
}

8. Structured Data / Schema.org

@* Add to View *@
<script type="application/ld+json">
{
  "@@context": "https://schema.org",
  "@@type": "Article",
  "headline": "@Model.CurrentPage.PageTitle",
  "description": "@Model.CurrentPage.PageDescription"
}
</script>

9. Popular SEO Add-ons


Review Questions

  1. Which property stores the URL slug of a page? (PageURLSegment)
  2. Which property maps to the HTML <title> tag? (PageTitle)
  3. Does CMS generate a sitemap automatically? (No – requires an add-on or custom implementation)
  4. How do you add a canonical URL? (Add manually in the layout view)
  5. Which property controls visibility in navigation? (PageVisibleInMenu)