Task #90772
closedSitemap.xml generation only contains relative links if no fcdn is defined inside site configuration
0%
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.
Updated by Alexander Grein over 4 years ago
A hint inside the documentation could also help:
https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/XmlSitemap/Index.html
Updated by Georg Ringer over 4 years ago
- Tracker changed from Bug to Task
- Status changed from New to Accepted
- Assignee set to Georg Ringer
- Target version set to Candidate for patchlevel
Updated by Kai Tallafus over 3 years ago
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?
Updated by Georg Ringer 6 months ago
- Status changed from Accepted to Closed
there 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 env
to set the domain