Legacy Knowledge Base
Published Jul. 2, 2025

Change the Sitemap format in Liferay DXP

Written By

Laura Li

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • The default Sitemap format in Liferay DXP is "Sitemap Index". For example, accessing http://localhost:8080/sitemap.xml will return the following content. How do I change the default format to use Sitemap instead?
<sitemapindex>
  <sitemap>
    <loc>http://localhost:8080/sitemap.xml?p_l_id=2&layoutUuid=056d0228-b82c-3a0f-800d-942f656b3cec&groupId=20122&privateLayout=false</loc>
  </sitemap>
</sitemapindex>

 

Environment

  • Liferay DXP 7.0 - 7.4

 

Resolution

  • Add the following property to portal-ext.properties and restart the server.

# Set this property to false to create the sitemap.xml file based in a
# layout set. By default, a sitemap index is created, which provides links
# to multiple sitemap files rather than one large file containing all the
# urlsets. This requires less bandwidth and improves performance. See
# https://www.sitemaps.org/protocol.html for more information.
#
# Env: LIFERAY_XML_PERIOD_SITEMAP_PERIOD_INDEX_PERIOD_ENABLED
#
xml.sitemap.index.enabled=false

 

Additional Information

  • Please note that both Sitemap Index and Sitemap are standard formats. Please refer to the following links for more information.

https://support.google.com/webmasters/answer/75712?hl=en
https://www.sitemaps.org/protocol.html#validating

Did this article resolve your issue ?

Legacy Knowledge Base