Legacy Knowledge Base
Published Jul. 2, 2025

Enable sitemap.xml from a third party in Liferay

Written By

Anishq Sharma

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How to articles!

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

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

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

Issue

  • How to add and enable sitemap.xml from a third party in Liferay DXP?

Environment

  • Liferay DXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3

Resolution

  • Liferay already generates a sitemap.xml file dynamically, it is not hosted at any place, and hence, cannot be replaced.
  • Alternatively, user can put their own sitemap.xml file at the ROOT folder of the server on which they are hosting Liferay, and provide the link of that particular file in robots.txt file.
  • Steps that can be taken to do the same for Tomcat application server
    • Go to liferay_home\tomcat\webapps
    • Create a folder with name site-a.
    • Place the third party sitemap.xml file inside this folder.
    • Start the server.
    • Redirect to localhost:8080/site-a/sitemap.xml, user should be able to get the xml file.
    • Now, navigate to Menu --> Site Builder --> Pages --> Click on Configure icon next to Public
    • Pages --> Switch to Advanced tab.
    • Edit the sitemap URL in robots.txt, switch it to, Sitemap: [$PROTOCOL$]://[$HOST$]:[$PORT$]/site-a/sitemap.xml, Save it.
    • Restart the server.
    • Result: The custom sitemap.xml is configured in tomcat application server.

Additional Information

  • The sitemap URL should be added to the robots.txt file, for making them available to search engines like google.
Did this article resolve your issue ?

Legacy Knowledge Base