Get more content like this

Generating Sitemaps using Adobe Experience Manager

sitemap-adobe-cq

Sitemaps are an easy way for webmasters to inform search engines about pages on their site that are available for crawling. Creating and submitting a sitemap will ensure that a search engine knows about all the pages on your site, including URLs that may not be discoverable by a search engines normal crawling process.  In its simplest form, a sitemap is an XML file that lists the URLs of a site along with additional metadata about each URL.  If your website has large number of URLs, you need to breakdown the sitemap into several sections, create a sitemap index file referencing them and then just submit the Sitemap index file to the search engines.

In this article we will talk about using Adobe Experience Manager(AEM) to generate sitemaps for sites served by AEM.

Step1: Create Sitemap index page

First you need to create a sitemap index template and a component to store the site sections which will go into the index file. The site sections are nothing but a link to top level category pages on the site. For each section we can also provide rules in the component dialog on what URLs to include from that section in the Sitemap e..g. “/…” would include all the URLs below the category. Write the rendering JSP xml.jsp  to output the sitemap index. Finally,create the sitemap_index page at the root of your website which you can use to submit to search engines and populate the components.

Step2: Rendering individual sitemaps

Sitemap index pages are referenced in the sitemap index using the convention <site url>/top-level-page.xml.  So we need to develop an xml.jsp for the base page of your site.  The renderer will go to the sitemap index page and fetch the rules for traversing the section pages. Additional filtering options can be provided at Page Properties level(See figure below).

sitemap-aem

If a page is marked as “Exclude subpages from Sitemap” then all child pages will be excluded. If “Exclude from sitemap” is marked, only the current page is excluded.

That is it! You are ready to submit your sitemaps to search engines. In the future we will be looking into the feasibility of providing priorities to the pages so that high traffic pages can be easily located through search.

References:

http://www.sitemaps.org/protocol.php

If you would like more help optimizing or managing your Sitemap with AEM Contact Us Today.

Learn more about how TechAspect can help you propel your digital transformation

Get In Touch