How I fixed the Sitemap XML module to exclude pages with restricted access in a scaled Sitecore website

How I fixed the Sitemap XML module to exclude pages with restricted access in a scaled Sitecore website

Few weeks ago I was working on a sitemap implementation for a website still using Sitecore 8.2 and I decided to use one of the available modules on the Sitecore Marketplace. I chose the Sitemap XML module because I was already familiar with the tool and I had already verified that it was compatible with this version of Sitecore.

An important requirement, that I was looking for, was the ability to exclude all pages not accessible by anonymous users from the content of the generated sitemap file. It doesn’t make sense to have a search engine to crawl restricted pages of a website, if the content of the actual pages is secured and accessible only by authenticated users with specific roles. The search engine would just crawl the login page or a “no access” page where the web application would redirect the crawling bot to.

CONTINUE READING