Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisite: multiple sitemaps in each robots.txt #18584

Open
2 tasks done
castelar opened this issue Jun 16, 2022 · 2 comments
Open
2 tasks done

Multisite: multiple sitemaps in each robots.txt #18584

castelar opened this issue Jun 16, 2022 · 2 comments

Comments

@castelar
Copy link

  • I've read and understood the [contribution guidelines]
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Many sitemaps are being referenced in robots.txt on multisite network.

Please describe what you expected to happen and why.

There should only be one sitemap in each robots file.

How can we reproduce this behavior?

  1. Activate Yoast on two or more sites on multisite network and enable XML Sitemaps for each
  2. Check each site's robots.txt

Used versions

  • WordPress version: 6.0
  • Yoast SEO version: 19.1
  • Tested with theme: Twenty Twenty-One
@nprovoost
Copy link

whats the status on this ?

@bjorn2404
Copy link

bjorn2404 commented Mar 28, 2023

Noting this can be addressed with the wpseo_should_add_subdirectory_multisite_xml_sitemaps filter. For example:

add_filter( 'wpseo_should_add_subdirectory_multisite_xml_sitemaps', '__return_false' );

It might be better to have the default functionality flipped though, with all sitemaps included if a setting is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants