Add setting for sitemap path

Created on 18 June 2025, about 2 months ago

Problem/Motivation

Many bots and content scrapers use the default "/sitemap.xml"

In order to reduce unwanted traffic, I should be able to change the default path ("/sitemap.xml") to some custom string.

Steps to reproduce

Proposed resolution

While I can do some of this by altering the path in the simple_sitemap.sitemap_default route, this doesn't change the paths in the sitemap overview. They remain "/sitemap.xml?page=1", etc
Modifying the base URL in the same vain leads to problems with the SitemapPathProcessor, that has "sitemap.xml" hard coded.

Remaining tasks

[] discuss whether this is SEO friendly - I think I only want to submit the sitemap using GSC and similar; I don't want other unknown bots to crawl the site endlessly
[] add setting in UI at '/admin/config/search/simplesitemap/settings'
[] implementation

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

4.0

Component

Code

Created by

miiimooo Europe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024