Configuring XML Sitemaps
Liferay DXP 2024.Q2+/Portal GA120+
XML sitemaps are XML-formatted documents listing the URLs of a website along with additional metadata (e.g. last update, change frequency, and importance relative to other URLs in the site). They streamline the process for search engine crawlers, enhancing their ability to uncover and index website content effectively.
You can view your XML sitemap by accessing http://your-site/sitemap.xml.
With Liferay, you can configure your XML sitemap to include/exclude sites and URLs from the sitemap.

To configure your XML sitemap,
-
Open the Global Menu (
), navigate to Control Panel, and open Instance Settings under Configuration. -
Select SEO under Platform and click XML Sitemap on the left.
-
Click Select to include sites from your sitemap.
You can also include/exclude child sites in the XML sitemap. When selecting a site, the number of child sites is shown below the site’s name. Click on it to see the child sites and select them.

To exclude a site from your sitemap, click Remove New Site (
) next to the added site.NoteThe XML sitemap only includes sites that don’t use virtual hosts.
-
Liferay DXP 2025.Q4 Select whether to include object entry and CMS content structure URLs in the XML sitemap.
In the Objects and CMS Content Structures section, click Select to choose which object definitions or structures to include. Only published entries or structures that have a display page template and a publicly accessible URL appear in the sitemap.
NoteWhen an object definition or content structure is added to this list, search engines are notified that its related entry URLs are available for crawling.
To remove an item from the sitemap, click Remove (
) next to the item. -
Select whether to include page (e.g., widget, content, panel, collection, and embedded) URLs in the XML sitemap.
You can add a page to the sitemap through the page’s configuration. Read Page Settings UI Reference to learn more.
-
Select whether to include web content URLs in the XML sitemap.
-
Select whether to include category URLs in the XML sitemap.
Caching and Scheduling the XML Sitemap
Liferay DXP 2026.Q3
By default, Liferay builds the sitemap every time a user or crawler requests it, and one file holds at most 50,000 URLs or 50 MB. Past either limit, the oldest URLs are dropped. To keep a large sitemap complete and stop rebuilding it on every request, group the sitemap files by asset type and serve them from cache on a schedule you set.
These settings cover the whole Liferay instance and every site included in the sitemap, so include your sites first. They also require XML Sitemap Index Enabled, which is selected by default; without it Liferay serves a single sitemap.xml file and caching is unavailable. Turning off the index or returning the mode to Group by Page Layout later discards the cached files and the schedule.
To access these settings, open the Global Menu (
) and go to Control Panel → Instance Settings → SEO → XML Sitemap.
This image shows the screen after these settings are configured.

-
In the XML Sitemap Index Mode drop-down, select Group by Asset Type.
The drop-down defaults to Group by Page Layout, so you must change it.
Group by Asset Type gives each asset type (pages, web content, categories, and object entries) its own sitemap file, splitting a type across more files instead of dropping URLs. Caching and scheduling are available only in this mode.
-
Click Save.
The screen reloads and an XML Sitemap Generation Mode section appears.
-
In the XML Sitemap Generation Mode section, select Scheduled Cached.
Scheduled Cached serves the sitemap from cache, regenerating it at each scheduled time only when content has changed, so it reflects content as of its last regeneration. The Frequency fields and a Save and Generate button appear.
To keep building the sitemap on each request, leave the default On-Demand selected and skip the remaining steps.
-
Set the schedule.
Select a Frequency, then fill in the fields it adds:
Frequency Additional Fields Hourly None Daily Time, Time Zone Weekly Day of Week, Time, Time Zone -
Click Save.
With no cached sitemap yet, Save also generates one. Later, Save stores schedule changes without regenerating, and Save and Generate regenerates immediately.
You can’t change the settings while regeneration runs, and the page reloads when it finishes.
Last updated shows the last regeneration time. Next Scheduled shows the next pending one, or a dash when no content has changed.
-
To confirm the change, go to
http://your-site/sitemap.xml.It now lists the individual sitemap files instead of all the URLs.