[ BUG ] Incorrect sitemap path in sitemap index
See original GitHub issueDescribe the bug
when using simpleSitemapAndIndex
I noticed in the sitemap-index.xml
the paths to the sub index paths don’t cotain the subfolder (destinationDir
) in the path.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.net/sitemap-0.xml</loc>
</sitemap>
</sitemapindex>
Expected behavior The location should contain the destination directory.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.net/sitemap/sitemap-0.xml</loc>
</sitemap>
</sitemapindex>
Context:
- version: 6.3.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
sitemap.xml build wrong urls for sitemapindex via cron #9440
Actual result. In the sitemapindex via cron the complete path from the home directory of the www-data user to the Magento 2 directory...
Read more >Fixing Sitemap Errors For Better Indexing of Submitted URLs
If Google fails to process URLs listed on the sitemap index file, you'll get an Invalid URL in sitemap index file error. It...
Read more >Manage your sitemaps using the Sitemaps report
Use the Sitemaps report to tell Google about any new sitemaps for your property, to see your sitemap submission history, and to see...
Read more >Magento 2 sitemap wrong paths in sitemap index when ...
Fixed it. Its not recommended but you can try it as temporary fix. Override below file.
Read more >Rank Math Sitemap Issues and Their Fixes
Not able to use the Sitemap functionality of Rank Math? Is it throwing errors at you? Don't worry, the issue is simpler than...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@moonmeister I’ll be releasing a version shortly that has support for a publicBaseUrl so you can specify a non-root base url for sitemaps.
Okay, that makes sense now, maybe i missed some docs clarifying that but didn’t realize that was the case.