#90772Sitemap.xml generation only contains relative links if no fcdn is defined inside site configuration
Description
If a site configuration only has a simple base entry like this:
base: /
A generated sitemap.xml only contains relative links, which prevent search engines to properly index all pages.
Additional crawler extensions like EXT:sitecrawler, who uses a valid sitemap (with absolute links) for a cache warm up, will fail.
To make developers life a bit sunnier, a hint comment inside the generated sitemap xml would be great:
“Add a FQDN to side configuration to get absolute paths”
A hint inside the site configuration modul, that the base setting also affects the sitemap generation, whould be usefull as well.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 4
-
Alexander Grein commented 03/17/20, 19:48
-
Georg Ringer changed tracker
BugTask statusNewAccepted assigned to Georg Ringer target version 03/17/20, 19:59 -
Kai Tallafus commented 03/23/21, 10:46
I don´t get why it behaves like this. We use different applicationContext based on domain, which we define using .htaccess:
RewriteCond %{HTTP_HOST} ^project\.local$ RewriteRule .? - [E=TYPO3_CONTEXT:Development] RewriteCond %{HTTP_HOST} ^staging\.project\.com$ RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging] RewriteCond %{HTTP_HOST} ^project\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.project\.com$ RewriteRule .? - [E=TYPO3_CONTEXT:Production]We do this, because we need the context in htaccess for other things anyway. So additionally defining the different bases in site configuration would be pretty redundant.
Is there any way to solve this with only having base: / in site configuration?
-
Georg Ringer commented and changed status
AcceptedClosed 05/25/24, 15:43there is a hint in the site configuration
> Main URL to call the frontend in default language. Can be https://www.example.com/ or just /, if it is just a / you cannot rely on TYPO3 creating full URLs
for multiple environements: either use the base variants or use
envto set the domain
A hint inside the documentation could also help:
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/XmlSitemap/Index.html