Sitemap and Robots in Sitecore Multisite
In the continuation of my previous blog Steps to be Performed after Multisite Configuration, I am going to discuss two important functionalities in terms of Google search crawling ranking and every website core functionality which are Sitemap and Robots txt implementation.
-
Create a new Template with two fields Sitemap and Robots.
- Inherit the above template on the Home page template of both Site nodes.
-
Create a patch file:
This patch file will have one pre-processor to allow the URL extension for XML and Txt files and another processor in the httpRequestBegin pipeline to serve Sitemap and Robots txt files.
-
Create a class in your project for the custom processor and use the
below code
-
Deploy your application and browse pages:
Website-a.com/sitemap.xml
Website-b.com/sitemap.xml
Website-a.com/robots.txt
Website-b.com/ robots.txt
If you want to implement the same functionality using ASP.NET HTTP Handler you can refer to this blog post: http://sitecoreclimber.wordpress.com/2014/07/27/sitecore-multisite-robots-txt/
Happy Sitecoreing 😊
Comments
Post a Comment