seo-pro icon indicating copy to clipboard operation
seo-pro copied to clipboard

Strange behaviour with sitemap generation

Open gpluess opened this issue 2 years ago • 2 comments

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

gpluess avatar May 27 '22 21:05 gpluess

What's in your config/statamic/sites.php? Try making sure the url contains the absolute URL, like https://mydomain.com/

jasonvarga avatar May 27 '22 21:05 jasonvarga

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

gpluess avatar May 29 '22 20:05 gpluess