Search Engine Optimization in SharePoint 2013


One of the new capabilities of SharePoint 2013 is the native support for Search Engine Optimization of public-facing websites. This article provides an overview of available capabilities as well as some architectural considerations.

SEO – you can’t do without it

When building public-facing websites you could assume that eventually your site will get indexed but it’s probably a better idea to ensure that your content will appear high in the organic search results. Search Engine Optimization (SEO) is the craft of optimizing public-facing websites for indexing by search engines.

From SEO perspective there are a number of things that you can do to improve the ranking of your content in organic search results. Some of them have to do with the content but there are a number of technology-related such as XML sitemaps or meta tags that you can use as well.

SEO and SharePoint 2010

Although SharePoint 2010 was a great and highly extensible platform for building public-facing websites, it didn’t offer any out of the box support for Search Engine Optimization of websites. To close the gap in the past two years we have built here at Mavention a number of solutions that can help you extend your public-facing website with SEO capabilities. Using solutions such as Mavention XML Sitemap, Mavention Meta Fields or Mavention Robots.txt you could add the missing functionality to SharePoint 2010 and get more out of your public-facing website built in SharePoint 2010.

SEO in SharePoint 2013

One of the new WCM-related capabilities in SharePoint 2013 is native support for Search Engine Optimization. Following is the overview of what SEO functionality SharePoint 2013 offers.

SEO Properties for Publishing Pages

SharePoint 2013 allows you to provide SEO Properties for your Publishing Pages. On a Publishing Page you can open the Ribbon, activate the Page tab and then from the Manage group, open the options under the Edit Properties button and choose the Edit SEO Properties option.

The ‘Edit SEO Properties’ option highlighted in the Ribbon

This will take you to the SEO Properties page where you can manage SEO-related data of your page.

SEO Properties page

The great thing is that all of those properties are stored as Site Columns so you can retrieve them in code but you can also have them made available in search if you’re using Cross-Site Collection Publishing.

The following SEO Properties can be set on a Publishing Page:

  • Title (Title field): page title on the page and in the navigation
  • Browser Title (SeoBrowserTitle field): page title in the title bar of the browser. Also used in organic search results
  • Meta Description (SeoMetaDescription field): meta description. Used sometimes in organic search results
  • Keywords (SeoKeywords field): meta keywords. Rarely used by public search engines
  • Sitemap Priority (SitemapPriority field). Used when generating XML Sitemap
  • Sitemap Change Frequency (SitemapChangeFrequency field). Used when generating XML Sitemap
  • Exclude from Internet Search Engines (RobotsNoIndex field). If set renders meta robots noindex

All underlying Site Columns and UI are installed by the SearchEngineOptimization Feature (ID: 17415B1D-5339-42F9-A10B-3FEF756B84D1) which is activated for Publishing Sites by default.

SEO Properties for Terms

One of the new capabilities of SharePoint 2013 is Managed Navigation where you can define the navigation of your website using a Term Set. The same SEO properties as available on Publishing Pages can be set on Terms. The difference is that the values are stored in Local Custom Properties of each Term. Following is the mapping of SEO Properties and Custom Local Term Properties:

  • Browser Title: _Sys_Seo_PropBrowserTitle
  • Meta Description: _Sys_Seo_PropDescription
  • Keywords: _Sys_Seo_PropKeywords
  • Sitemap Priority: _Sys_Seo_PropSitemapPriority
  • Sitemap Change Frequence: _Sys_Seo_PropSitemapUpdateFrequency
  • Exclude from Internet Search Engines: _Sys_Seo_PropSitemapNoIndex

Canonical URLs

An important step in optimizing your website for search engines is specifying the canonical URL. The canonical URL is the URL that uniquely identifies the content of the page and which is stored in the index of search engines. By properly configuring canonical URLs you can prevent duplicated content from being indexed.

SharePoint 2013 automatically generates for you the canonical URL. The only thing that you might want to configure are the query string parameters that you want to exclude from the canonical URLs. This can be configured in the Site Collection SEO Settings.

Site Collection SEO Settings

Aside from specifying SEO Properties for particular Publishing Pages and Terms, SharePoint 2013 allows you to define meta tags on the Site Collection-level. Those are very useful for example if you need to verify the ownership of your website with web analytics services on the Internet.

Site Collection SEO Settings can be configured through Site Settings > Site Collection Administration > Search engine optimization settings.

The ‘Search engine optimization settings’ link highlighted in Site Settings

On the SEO Settings page you can specify custom meta tags that will be added to all pages as well as you can define query string parameters that should be excluded from canonical URLs.

Rendering SEO Properties

After SEO Properties have been configured, some of them are rendered in the HTML to be processed by search engines while crawling the content. Rendering of SEO Properties is being done by a number of delegate controls that are activated by the SearchEngineOptimization Feature. All those controls are associated with the AdditionalPageHead Delegate Control so you want to ensure that you have it present on your Master Page if you want to use the standard SharePoint 2013 SEO capabilities on your website.

Following is the overview of Delegate Controls responsible for rendering SEO properties on the page. All of those controls are located in the Microsoft.SharePoint.Publishing assembly in the Microsoft.SharePoint.Publishing.WebControls namespace.

  • Browser Title: SeoBrowserTitle
  • Meta Description: SeoMetaDescription
  • Keywords: SeoKeywords
  • Exclude From Internet Search Engines: SeoNoIndex
  • Canonical URL: SeoCanonicalLink
  • Custom Meta Tags (defined at Site Collection-level): SeoCustomMeta

XML Sitemap

One of the great gaps in SharePoint 2010 was the lack of a mechanism that would generate XML Sitemap. By submitting an XML Sitemap to search engines you can help them discover content on your website.

SharePoint 2013 provides native support for generating XML Sitemaps. In order to have an XML Sitemap generated for your website you first have to enable the Search Engine Sitemap Site Collection Feature. This will register the Site Collection with the Search Engine Sitemap job Timer Job which by default runs daily and generates an XML Sitemap for every Site Collection that has been registered with that Timer Job.

The Search Engine Sitemap job generates not only the XML Sitemap itself but also modifies the robots.txt file where it adds the link for the XML Sitemap file so that it can be easily discovered by search engines.

Friendly URLs

One of the great improvements in SharePoint 2013 for Web Content Management it the separation of URLs and site hierarchy. Using Managed Navigation you can now define the structure of your site and by tagging the content with the right terms you can ensure that the content will be published at the right location in your website.

Using Managed Navigation allows you to use friendly URLs: URLs without /pages/ and .aspx. Additionally Welcome Pages of Webs are served from the web URL so you will see neither /pages/default.aspx nor 302 Temporarily Moved redirects anymore!

Architectural Considerations

The Search Engine Optimization capabilities of SharePoint 2013 can help you improve the ranking of your content in organic search results. There are however a few things that you should take into account while designing for SEO in your public-facing website on SharePoint 2013.

It’s all or nothing

Search Engine Optimization functionality of SharePoint 2013 is provided as a single functional unit. When you enable the SearchEngineOptimization Feature you will deploy all Site Columns, enable the UI and activate all Delegate Controls. By default there is no way for you to choose which components you would like to use. One way to work around this limitation would be to create your own Feature to for example enable only specific Delegate Controls.

It’s internal

In SharePoint 2013 Preview the SEO capabilities are not extensible. All of the API is internal and cannot be used in your solutions. With that it’s impossible to modify or extend any of the default behavior and should you need it, you would have to build everything from scratch yourself.

Rendering SEO Properties

All SEO Properties are rendered using Delegate Controls associated with the AdditionalPageHead Delegate Control. If you want to have your SEO Properties rendered you have to ensure that this Delegate Control is present in your Master Page.

Browser Title

The Browser Title SEO Property is rendered using the SeoBrowserTitle control. After this control retrieves the Browser Title, it will look for the PlaceHolderPageTitle Content Placeholder and replace all its content with the Browser Title! This means that if you want to use hierarchical titles on your website, you have add parent hierarchy in the Master Page outside the PlaceHolderPageTitle Content Placeholder for the SeoBrowserTitle not to overwrite it.

XML Sitemap

For the XML Sitemap to be generated it requires anonymous access on the Default Zone of the Site Collection for which it’s generating the XML Sitemap. Additionally in SharePoint 2013 Preview there is a bug with generating the URLs. While building the XML Sitemap the Timer Job replaces the URL of the Default Zone of the Site Collection by the URL of the Internet Zone which, if not explicitly set, falls back to the SPSite.Url property. Because the SPSite.Url property doesn’t contain a trailing slash the replaced URL doesn’t contain a slash after the host name and before the path name which results in an invalid URL.

Friendly URLs

Publishing Pages that have friendly URLs can still be requested using their physical URLs. If not dealt with properly this can lead to content duplication, particularly as in SharePoint 2013 Preview the canonical URL changes alongside and renders the physical URL of the page.

Summary

SharePoint 2013 provides native support for Search Engine Optimization of public-facing websites for Internet Search Engines. In this article I have showed you what the new SEO capabilities are, how they work and how you can benefit of them when building public-facing websites on SharePoint 2013.

Others found also helpful: