Hello community,
We are trying to generate sitemap indexes from Magento Admin.
For example, we have created a sitemap index for Lebanese Website -> French Language with the following:
media/sitemap_lbn_fr.xml, it works fine and we can fetch the sitemap index and the sitemaps within.
After few days, the sitemaps within the sitemap index have their URLs changed adding /lbn/fr to them, so they become like this: /lbn/fr/media/sitemap_lbn_fr-7-1.xml and they return 404.
Although if I remove the /lbn/fr/ from the URL, it opens normally.
Can someone please guide me why is it adding /lbn/fr subdirectory and breaking all sitemaps? And how to solve that?
Please note we have 6 sitemaps corresponding to three languages and two regions (one local and one international)
Hello @josephtann1478
Check Base URLs and Store Configuration: Ensure that your Magento store's base URLs and language configurations are set up correctly. Incorrect configurations can lead to URL inconsistencies.
URL Rewrites: Magento uses URL rewrites to create user-friendly URLs. Make sure that there are no conflicting URL rewrites in your system that might be affecting the sitemap URLs. You can check this in the Magento Admin under Marketing > SEO & Search > URL Rewrites.
Cache Management: Sometimes, outdated cache might cause unexpected URL behavior. Clear the cache in your Magento Admin under System > Cache Management.
Catalog URL Rewrites: Go to Catalog > URL Rewrite Management and check if there are any URL rewrites affecting the sitemap URLs. You might need to delete or recreate incorrect rewrites.
Reindexing: Magento relies on index tables for efficient data retrieval. Make sure to reindex your data by going to System > Index Management and selecting "Reindex All" if necessary.
thank you for sharing