question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ BUG ] Incorrect sitemap path in sitemap index

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
derduhercommented, May 2, 2021

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

0reactions
moonmeistercommented, May 2, 2021

Okay, that makes sense now, maybe i missed some docs clarifying that but didn’t realize that was the case.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found