Sitemaps¶
Sitemaps help search engines discover and index documentation pages. The Sphinx Stack generates a sitemap with the sphinx-sitemap extension. A sitemap will be available at different locations, depending on how it is generated.
Read the Docs-generated sitemaps¶
RTD generates a basic sitemap pointing to the index page, and relies on crawlers to index the site. This is sufficient for some projects, but RTD does not generate sitemaps for subprojects. This means any project under the Ubuntu documentation library project must generate its own sitemap.
Sitemaps generated by Read the Docs are available at the base domain of a project. For example, https://sphinx-sitemap.readthedocs.io/sitemap.xml.
sphinx-sitemap-generated sitemaps¶
The Sphinx Stack builds the documentation with the dirhtml builder by default. The dirhtml builder is required because sitemap links use
directory-style URLs. Projects using an older version of the Sphinx Stack or a different builder generate malformed sitemap links.
The Sphinx Stack includes the sphinx-sitemap extension and its default configuration. Sitemaps generated by sphinx-sitemap are placed in the base of the URL schema used by the RTD instance. For example, https://sphinx-sitemap.readthedocs.io/en/latest/sitemap.xml.
For the available sitemap settings and their default values, see Sitemap configuration. For instructions on supporting versioned documentation, see Manage sitemaps for versioned documentation.