Issue Task Closed

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

Alexander Grein 03/17/20, 19:41 updated 05/25/24, 15:43

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

  1. Alexander Grein commented 03/17/20, 19:48

  2. Georg Ringer changed tracker Bug Task status New Accepted assigned to Georg Ringer target version 03/17/20, 19:59

  3. 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?

  4. Georg Ringer commented and changed status Accepted Closed 05/25/24, 15:43

    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