Thursday, July 21, 2016

Configure Sitemap in SharePoint 2013

In SharePoint 2013, we have native support for generating XML sitemaps which was not present in the earlier versions of SharePoint. Sitemaps basically inform the search engines about the pages and their metadata, present in your site. This help the crawlers in picking up those pages. This is a great feature especially for public facing websites.
There are three prerequisites for generating sitemap:
  1. This feature is available for publishing sites only.
  2. Anonymous access should be enabled for both web application and site collection.
  3. Search should be configured in the environment.
The step by step procedure to generate sitemap is:
1. Enable anonymous access for web application. For this go to “Central Admin” -> “Manage Web Applications” . Select your web application and click on “Authentication Providers” in top ribbon. Click on the zone. There you will get the option to enable anonymous access.


2. Enable anonymous access for site collection.
Go to “Site Settings” -> “Site permissions”. Click on “Anonymous Access” in the top ribbon and select “Entire Web site”. Click “OK”


3. Activate “Search Engine Sitemap” feature of site collection. This registers a timer job “Search Engine Sitemap Job” for generating sitemap. This job by default runs daily.


4. As sitemap generation uses Search Service to generate sitemap; run full crawl or incremental crawl as applicable to your environment. 
Go to “Central Admin” -> “Application Management” -> “Manage service applications” -> “Search Service”.
Then click on “Content Sources” and run full/incremental crawl for your content source.

5. For getting instantaneous result, run the timer job "Search Engine Sitemap Job" mentioned in step 3 for your web application manually.

6. And we are done.


The sitemap is located at the root level site collection. The url to access the sitemap is http://<WebApp>/sites/<SiteColl>/sitemap.xml. This file contains the location of actual sitemap and that is http://<WebApp>/sites/<SiteColl>/sitemap0.xml. The content of the sitemap file is like: 

And if we need to display the site map for multiple sites, then follow the above steps for each site collection, then the site map will be generated for those sites also.
Hope this helps.

No comments:

Post a Comment