Saturday, March 29, 2014

Problem with SEO properties for pages with friendly URLs in Sharepoint 2013

Sharepoint 2013 has OTB SEO features which allow you to optimize your sites for search engines. In order to use them you need to activate SearchEngineOptimization feature. After that in ribbon on your publishing pages there will be “Edit SEO properties” command:

image

The problem is that if your friendly URL equal to the real site’s URLs (which is not bad because it is possible to switch to structural URLs and your links will still work, because http://example.com/test will be automatically resolved to http://example.com/test/pages/default.aspx), then “Edit SEO properties” command will be disabled:

image

However it is still possible to edit SEO properties using direct URL. E.g. if we are on http://example.com/test site. In order to edit SEO properties open the following URL in the browser:

http://example.com/test/_layouts/15/SEOProperties.aspx?Source=/test/pages/default.aspx&page=1

There are several important moments:

  1. URL should be relative to the current site (http://example.com/test), not e.g. for the root site of site collection;
  2. Source query string param should contain server relative real URL of the page (/test/pages/default.aspx).

If you made it correctly, you should see SEO properties page opened and after saving changes will be applied to the page, regardless of real or friendly URL are used in browser:

image

Hope that this workaround will help you.

No comments:

Post a Comment