XML Sitemap documentation for the dotCMS Content Management System

The XML Sitemap feature allows you to establish a scheduled build of an XML Sitemap that can be submitted to search engines as a persistently updated sitmap url.


The following properties in the dotmarketing-config.properties file control the operation of the XML Sitemaps feature.

Note: It is strongly recommended that all changes to the dotmarketing-config.properties file be made through a properties file extension.

org.dotcms.XMLSitemap.ENABLEBooleanfalseSet to true to enable the XML Sitemap feature.
org.dotcms.XMLSitemap.JOB_NAMEStringNoneName of the cron job that creates the sitemap xml file.
org.dotcms.XMLSitemap.JOB_GROUPStringNoneName of the cron job group.
org.dotcms.XMLSitemap.JOB_DESCRIPTIONStringNoneDescription of the cron job.
org.dotcms.XMLSitemap.CRON_EXPRESSIONCron Expression1 1 1 * * ?Sitemap build frequency.
org.dotcms.XMLSitemap.USE_PERMALINKSBooleanfalseUse ID-based permalinks for all content (as opposed to user-friendly URLs).
org.dotcms.XMLSitemap.USE_STRUCTURE_URL_MAPBooleanfalseInclude URL mapped content links.
Note: These are included only if USE_PERMALINKS is set to false.
org.dotcms.XMLSitemap.XML_SITEMAPS_FOLDERStringNoneName of the backend folder to store the sitemap.
Note: This folder must be at the root of the Site Browser tree.
org.dotcms.XMLSitemap.SITEMAP_XML_FILENAMEStringNoneName of the XML sitemap file before compression.
Note: This file is not visible in the dotCMS backend UI.
org.dotcms.XMLSitemap.SITEMAP_XML_GZ_FILENAMEStringNoneName of the compressed master file.
Note: This file is visible in the dotCMS backend UI.

Sample Configuration

The following sample configuration sets all of these properties to default settings which enable the XML sitemap with default behavior:

org.dotcms.XMLSitemap.JOB_NAME=XML SiteMap Job
org.dotcms.XMLSitemap.JOB_GROUP=XML SiteMap Job
org.dotcms.XMLSitemap.JOB_DESCRIPTION=XML SiteMap Indexation Job
org.dotcms.XMLSitemap.CRON_EXPRESSION=1 1 1 * * ?

Optional Configuration

The following additional parameters can be added to prevent the sitemap from including certain portions of your site or content:

  • The value must be a comma separated list of Content Type variable names.
  • All content items of Content Types in the list will be omitted from the sitemap.
  • The value is a regular expression representing a portion of the URL to match.
  • Replace ContentTypeVar with the variable name of the Content Type of interest.
  • All content items of that Content Type which match the specified regex in the URL will be omitted from the sitemap.
Important Note:
  • This property is only used if the org.dotcms.XMLSitemap.USE_STRUCTURE_URL_MAP property is set to true.


Consider the following configuration:


Adding these parameters prevents the following from being added to the sitemap:

  • All content items of the Content Type “Product Promotion” (referenced by the Content Type variable productPromotion).
    • Note: All content items of this Content Type will be omitted, regardless of the URL used to access those content items.
  • Any content items of the Content Type “Service Promotion” (referenced by the Content Type variable servicePromotion) which include the string /campaigns in the URL.

Cron Expressions

The sitemaps are generated periodically based on the cron expression defined in the org.dotcms.XMLSitemap.CRON_EXPRESSION property. The default cron expression is 1 1 1 * * ?, which causes the sitemap XML file to be built once a day. To update the sitemap XMP file more frequently, you can change the cron expression. However on very large sites, building the sitemap can cause an impact on performance, so it is important to balance the need for updates with site performance capacity and requirements.

For more information on how to configure cron expressions, please see the Quartz cron documentation.

File Information and Usage

The Sitemap Index

The Sitemap Index contains the information needed for search engines and robots to index the content on your site.

Index URL

The Sitemap Index is accessed via the following URL:


Once the scheduled sitemap job has run, this URL can be submitted to search engines so that they can ingest the latest sitemap and index your content.

For more information on how to submit this URL to different search engines, please see Submitting Your Sitemap, below.

Index Contents

The Sitemap Index contains a list of each individual sitemap file; the following sample shows the format of the index:

<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd">


  • Although the Sitemap Index is accessed as though it was a file on your site, it is not contained in an actual file.
    • Instead, the Sitemap Index is automatically and dynamically generated each time the URL for the index is accessed.
  • This means:
    • There is no sitemap_index.xml file on the dotCMS backend (in your Site Browser tree).
    • If you remove or archive individual Sitemap files from the dotCMS backend, those files will no longer display in the index, even if the sitemap job has not been run again since you removed the files.

Individual Sitemap Files

The Sitemap files linked to by the Sitemap Index are compressed XML files that each contain site map information for content on your site. Each time the sitemap job is run, 1 or more new Sitemap files is created, and the Sitemap Index file is updated to include a link to the new Sitemap file(s).

File Properties

Each Sitemap file is limited to a maximum of 50,000 entries (50,000 URLs) and a maximum of 9MB size. If your site has more than 50,000 URLs, or the file size exceeds 9MB, additional Sitemap files will be created.

After being built, each Sitemap file is compressed for faster delivery and performance, and linked to by your Sitemap Index. Since your Sitemap Index links to every sitemap file, submitting the single Sitemap Index to a search engine ensures that all content is submitted (not just the URLs from 1 individual Sitemap file).

File Location

Individual Sitemap Files are saved under your dotCMS host (visible in the Site Browser tree) under the folder specified by the org.dotcms.XMLSitemap.XML_SITEMAPS_FOLDER property (e.g. /XMLSitemaps/). Each file is named xmlSitemapGenerated[uniqueId].xml.gz, where [uniqueId] is a unique identifier for the file generated from the date and time the sitemap job is run.

File Contents

Each sitemap file contains links to:

Example File

The following is an example of a generated sitemap file:

<!--?xml version='1.0' encoding='UTF-8'?-->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">

Submitting Your Sitemap

To submit your sitemap to the Google or Bing search engines, please see the following search engine documentation:

To have other search engines index your site content, please see the notes below:

  • Ask.com:
    • Ask.com no longer accepts sitemap submissions.
    • To ensure that Ask.com properly indexes your content, reference your sitemap XML file from your robots.txt file.
  • Yahoo:
    • Yahoo now uses Bing site submission services.
    • To submit your sitemap to Yahoo, submit it to Bing (see above).
  • MSN:
    • MSN has been combined with Bing.
    • To submit your sitemap to MSN, submit it to Bing (see above).


For more information about sitemap protocol, please see the Sitemaps.org protocol document.