Generating Sitemaps using Adobe Experience Manager
Jun 18, 2014
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 the 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 a 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 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 /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).
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.
GET HELP FROM OUR EXPERTS
Over the past 17 years, we have completed thousands of digital projects globally. We have one of the largest and deepest multi-solutions digital consulting teams in the world. Our proprietary processes and years of Digital Experience expertise have earned us a 97% customer satisfaction rating with our clients ranging from Global Fortune 1000 to Mid-Market Enterprises, leading educational institutions, and Non-Profits.
If you would like more help optimizing or managing your Sitemap with AEM Contact Us.
TechAspect is an innovative digital transformation agency, specializing in delivering the digital experience, commerce, and marketing solutions. For nearly two decades, we have been helping traditional businesses transform and create dynamic digital cultures through disruptive strategies and agile deployment of innovative solutions.