Project

General

Profile

Actions

Task #90772

closed

Sitemap.xml generation only contains relative links if no fcdn is defined inside site configuration

Added by Alexander Grein over 4 years ago. Updated about 1 month ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
SEO
Start date:
2020-03-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #2

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
Actions #3

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?

Actions #4

Updated by Georg Ringer about 1 month 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

Actions

Also available in: Atom PDF