Incorrect Sitemap URL Handling
-
Hello, I am using the “XML Sitemap Generator for Google” plugin on my WordPress site. I have encountered an issue with the handling of sitemap URLs. The correct URL for my sitemap is ‘domainname/sitemap.xml’, which works as expected.
However, I have noticed a significant issue. When accessing any URL following the format ‘domainname/sitemap-xxx.xml’, where ‘xxx’ can be any arbitrary string (for example, ‘domainname/sitemap-aaaabbbbcccc.xml’), instead of receiving a 404 error, it displays the same content as my actual ‘sitemap.xml’.
This problem occurs with any string following ‘sitemap-‘, not just specific terms.
This behavior is problematic as Search Console is recognizing these invalid sitemap URLs as legitimate, leading to potential confusion and SEO issues.
Could you please provide insight into why this is happening and how to rectify it so that only the correct sitemap URL displays the sitemap content, and all other non-existent sitemap URLs return a 404 error? Thank you for your help.
Best regards,
- The topic ‘Incorrect Sitemap URL Handling’ is closed to new replies.