I have been working on a new project recently to migrate existing SharePoint 2010 websites into SharePoint 2013. One of the obvious benefits for this migration is the ability to use Managed Metadata Navigation to create friendly Urls. While this post is within the context of a SharePoint Migration, the “issue” or “feature” is not dependent on a migration and is apparent on new Site Collections.
The Requirements are very simple:
- Create managed navigation to pages in the Site
- Assign SEO metadata to each page to be displayed by Search Engines.
- Create a Home navigation link to return the user to the Homepage of the site (this is the catalyst for the issue)
- Confirm that all keywords and description meta-tags are appearing to end users.
At first glance the solution appears simple. Create a new Term Set, create some terms, assign a page to one or many terms, and then the rest is catered for you automatically. However when trying to create the “Home” node I stumbled upon an issue. Typically when you create managed metadata navigation you assign a friendly Url to every term (e.g. /about , /news , /contact ).
However, when you create a Home node you do not want to have the Url to this node to become “/home” you instead want it to go to “/” (the site root) instead.
SharePoint will gladly permit you to assign a forward slash (i.e. no term name) against a term and when you navigate back to your site the Navigation term exists, it goes to your homepage and you believe everything is right with the solution. Wrong!
Performing these steps however has raised a couple of issues when trying to modify the SEO of the page.
Firstly a page assigned to a term which does not have friendly Url with any text in it (i.e. “/”) does NOT allow you to modify the SEO properties of the page.
The menu option is simply disabled if not configured correctly.
I thought that there may be an underlying issue with permissions on the page. After providing a friendly url for the page, the option magically becomes active and I can then set the SEO Settings. I therefore filled in the properties and then after saving, reverted my term to remove the friendly url part and assume all is great. Wrong again!
This highlighted the second issue (and in my opinion more worrying one), which is when viewing the page as an anonymous user I now discover that it is missing the SEO metadata tags on the page (No keywords or description appears in my source code). Perhaps it didn’t save my SEO? I retrace my steps and set a friendly url, check the page SEO settings, and see that they are all there. The term definitely has my SEO settings associated with it. I go back to my page (now with a friendly URL) and I notice that the Keywords and Description meta tags are appearing in the page source.
It appears that if you do not properly assign a friendly url to a term like the image above, SharePoint will NOT render the controls correctly even though the term has associated metadata.
The Work Around
The workaround for this issue is quite a simple one, but none the less frustrating as it does not allow you to use relative URL’s in the Term set. On your navigation term in the Term Store Management Tool, you need to assign the “Home” term to be “Simple Link or Header” rather than “Term-Driven Page with Friendly URL”.
By setting the term node type to a specific URL enables you to assign a term to a page like before (and therefore get the benefits of SEO) without losing the metadata tags off the homepage source. The drawback to this is obviously that you are unable to use tokens e.g. ~sitecollection in this link or header block but I think this is a small price to pay for the required functionality.
Managed Navigation Term Sets in SharePoint 2013 are a fantastic addition to the SharePoint 2013 Toolset and really makes SharePoint 2013 as a Website Platform that much more flexible and competitive with alternatives. I hope this post helps some people out there.