Skip to content

Noindex-Aware Sitemap Behavior

SEOvault AI’s XML sitemap is noindex-aware. Any post, page, or taxonomy term you mark as noindex is automatically excluded from the sitemap. This happens at the database query level, so the cached sitemap files never contain URLs you do not want search engines to crawl.

When the sitemap is built, the plugin queries the database for posts and terms. Before adding a URL to the sitemap, it checks the SEOvault AI robots meta for that item:

  • If a post has the Noindex checkbox checked in the SEOvault AI meta box, it is excluded.
  • If a category or tag has the Noindex checkbox checked in the term meta box, it is excluded.
  • If a post type is set to noindex globally under SEOvault AI > General > Robots, all posts of that type are excluded.
  • Password-protected posts are always excluded, regardless of other settings.

The exclusion happens during the query itself. The sitemap builder adds a NOT IN clause to the SQL query to skip the IDs of noindexed items. This means the sitemap cache only contains URLs you have explicitly allowed.

To exclude a specific post or page from the sitemap:

  1. Open the post or page in the WordPress editor.
  2. Find the SEOvault AI meta box.
  3. Check the Noindex checkbox under the Robots section.
  4. Save or update the post.

The sitemap cache is invalidated automatically when you save. The next time the sitemap is rebuilt, the post is excluded.

To exclude a category, tag, or custom taxonomy term from the sitemap:

  1. Go to Posts > Categories or Posts > Tags (or the edit screen for your custom taxonomy).
  2. Click Edit on the term you want to exclude.
  3. Find the SEOvault AI section.
  4. Check the Noindex checkbox.
  5. Click Update.

The sitemap cache is invalidated automatically. The term is excluded from the next rebuild.

If you set an entire post type to noindex globally, all posts of that type are excluded from the sitemap:

  1. Go to SEOvault AI > General > Robots.
  2. Under Post Types, uncheck the post types you want to noindex.
  3. Click Save Changes.

The sitemap is rebuilt automatically. The unchecked post types no longer appear in the sitemap index or sub-sitemaps.

Even if you do not use the SEOvault AI custom sitemap, the plugin still helps exclude noindexed content from the default WordPress core sitemap.

When the SEOvault AI sitemap is disabled, the plugin hooks into the core sitemap query:

add_filter( 'wp_sitemaps_posts_query', array( Manager::class, 'exclude_noindexed_posts' ), 10, 2 );

This filter adds the same noindex exclusion logic to the WordPress core sitemap. Posts marked as noindex in SEOvault AI are not included in wp-sitemap.xml either.

What happens after you change noindex settings

Section titled “What happens after you change noindex settings”

When you mark a post or term as noindex, the sitemap cache is invalidated immediately. A background rebuild is scheduled within 5 seconds. The next time the sitemap is requested, the updated version is served.

If you manually purge the sitemap cache by clicking Purge Sitemap Cache in the settings, the entire sitemap is rebuilt with the current noindex settings applied.

  • Cache delay: There is a short delay between saving a noindex setting and the sitemap reflecting the change. The background rebuild runs within seconds, but a crawler that requests the sitemap immediately might see the old version for a brief moment.
  • Manual output mode: In Manual output mode, the plugin does not auto-generate SEO values, but the sitemap still respects the noindex checkboxes you manually set.
  • Disabled output mode: In Disabled output mode, the entire plugin is paused. The sitemap is not served, and no noindex exclusion is applied to the core sitemap.
  • Password-protected posts: These are always excluded from the sitemap, even if you do not check the Noindex box. Search engines cannot index password-protected content.
  • Private post types: Private post types are not included in the sitemap because they are not public. Only public post types are eligible.
  • Attachment URLs: Attachments are never included in the sitemap, regardless of noindex settings.