Bug #105837
openSitemap.xml can be called with every URL of one domain
0%
Description
So I am accusing a strange behavior:
If I add /sitemap.xml to every URL in my domain, i can call the sitemap.xml
test.de/sitemap.xml
test.de/anotherURL/sitemap.xml
test.de/anotherPath/to/anotherURL/sitemap.xml
etc.
These are also no redirects e.g. from test.de/anotherURL/sitemap.xml -> test.de/sitemap.xml
My sitemap configuration looks like this:
routeEnhancers:
PageTypeSuffix:
type: PageType
map:
sitemap.xml: 1533906435
Am I doing something wrong?
I thought the sitemap.xml should only be displayed at test.de/sitemap.xml
This occurs in v12 and 13
Updated by Fabian Schiller about 1 month ago
Description:
I am experiencing an unexpected behavior with the sitemap functionality in my setup. When I append /sitemap.xml to any URL within my domain, the system serves a sitemap file. This occurs not only at the expected location (mydomain.de/sitemap.xml) but also at paths such as:
- mydomain.de/anotherURL/sitemap.xml
- mydomain.de/anotherPath/to/anotherURL/sitemap.xml
These are not redirects (e.g., mydomain.de/anotherURL/sitemap.xml → mydomain.de/sitemap.xml); the system appears to generate and serve a file for these nested paths as if they were real files.
Expected Behavior:
I expected the sitemap to only be accessible at mydomain.de/sitemap.xml.
Environment:
This issue occurs in both version 12 and 13.
Question:
Am I misconfiguring something, or is this behavior unintended?
Configuration (site config):
routeEnhancers:
PageTypeSuffix:
type: PageType
map:
sitemap.xml: 1533906435
Thank you for your assistance!
Updated by Garvin Hicking about 1 month ago
- Status changed from New to Needs Feedback
Basically that's "working as intended". The pageSuffix enhancer works across the whole instance.
Could you elaborate in which regard this may be a problem for you?
Updated by Fabian Schiller about 1 month ago
While performing a search using Indexed Search for specific terms, we noticed that for each search term (or URL), there is an additional result appearing in the search results in the form of mydomain.de/term/sitemap.xml.
This does not appear to be an issue related to TYPO3 itself but rather a configuration problem within Indexed Search. It seems the sitemap URLs are being indexed and included in the search results, which is likely unintended behavior.
Updated by Garvin Hicking about 1 month ago
Thank you; indeed this scenario would benefit from only having a single sitemap result (still a single result would show up for you which is probably still unintended).
I'm leaving this open as Benni has some ideas about this kind of routing.
Updated by Fabian Schiller about 1 month ago
I found a solution. Adding the line
seo_sitemap.config.index_enable = 0
in your setup.typoscript effectively prevents the sitemap.xml from being indexed.