nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
162 stars 68 forks source link

Sitemap broken redirect from sitemap index #1398

Closed mboostrom closed 5 months ago

mboostrom commented 6 months ago

Describe the bug

A clear and concise description of what the bug is. Within the sitemap index, if I try to click on one of the specific url's I am getting redirected to an error page. steps taking trying to correct this:

To reproduce

Steps to reproduce the behaviour:

  1. Go to sitemap index from craft url: http://local.quickbase.com/sitemap.xml sitemap index looks like this for me. Screenshot 2024-01-04 at 10 22 20 AM

  2. Click on any of the urls generated

  3. See error message this is from http://local.quickbase.com/sitemaps-1-section-empowerHome-1-sitemap.xml this error happens on 90% of the links only a select few actually open the correct sitemap page shown in the expected behavior section. On this error it is redirecting to a page that does not exist and retour is turned off. http://local.quickbase.com/var/www/quickbase/web/ Screenshot 2023-12-29 at 10 23 39 AM

Expected behaviour

A clear and concise description of what you expected to happen. when clicking on any of those urls I should see this page instead of an error and being redirected Screenshot 2024-01-04 at 10 14 28 AM

Versions

khalwat commented 5 months ago

Looking at the sitemap index from your live site, it looks like the URLs in the sitemap are just... wrong:

<loc>https://www.quickbase.com/about-us/leadership</loc>

Are we sure that something in the devops mix here isn't potentially interfering? Because it's missing a whole lot that should be there:

https://github.com/nystudio107/craft-seomatic/blob/develop-v4/src/services/Sitemaps.php#L353

It looks like somehow the sitemap index is being mapped to a particular sitemap. The sitemap index page should look like this:

https://nystudio107.com/sitemap.xml

I can only guess that some kind of devops / redirect / rewrite or such is in the mix here. This isn't what SEOmatic renders for the sitemap index page.