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. 

  1. Create a new Template with two fields Sitemap and Robots.
    sitemap-and-robots-in-multisite-1
  2. Inherit the above template on the Home page template of both Site nodes.
  3. 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.
  4. Create a class in your project for the custom processor and use the below code
  5. 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

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore Technology MVP Journey 2022