seo-pro
seo-pro copied to clipboard
Strange behaviour with sitemap generation
In a client project, 4 out of 48 pages in the sitemap.xml do not start with "https://www.mydomain.com/", instead they only contain a leading slash and the page slug and I have absolutely no idea why. Or how to debug this. In addition, the affected pages do not seem to be related. Clearing the cache does not help. Any ideas how to fix this? Thanks!
Statamic 3.2.39 Pro (with multisite) Laravel 8.83.9 PHP 8.0.17 doublethreedigital/cookie-notice 5.1.0 statamic/seo-pro 2.3.2
What's in your config/statamic/sites.php
? Try making sure the url
contains the absolute URL, like https://mydomain.com/
My config/statamic/sites.php
looks like this:
'sites' => [
'en' => [
'name' => 'English',
'locale' => 'en_US',
'url' => env('APP_URL') . '/en/',
],
'de' => [
'name' => 'Deutsch',
'locale' => 'de_DE',
'url' => env('APP_URL') . '/de/',
],
],
I added env('APP_URL')
as per your suggestion, but this didn't change anything. The same 4 pages as before only contain the page slug instead of the full URL in the sitemap...