|
/ Documentation /Sitemaps/ How to Regenerate the Sitemap After Excluding a Post Type in SureRank

How to Regenerate the Sitemap After Excluding a Post Type in SureRank

SureRank offers a Sitemap Excludes feature that allows you to Exclude Post Type from appearing in your XML sitemap. This is useful when you want to prevent certain posts from being indexed by search engines.

However, after making any changes in the Sitemap Excludes settings, it’s important to regenerate your sitemap so the changes reflect properly.

When Should You Regenerate the Sitemap?

You need to regenerate your sitemap every time you:

  • Exclude or include any post type using the Sitemap Excludes setting.
  • Modify existing exclusions.

Without regeneration, the changes won’t take effect, and search engines may still access outdated or undesired URLs.

How to Regenerate the Sitemap in SureRank

There are two ways to regenerate the sitemap:

1. Using WP-CLI (Recommended for Immediate Effect)

If you have access to the command line on your server, run the following command:

wp surerank generate_cache

This will instantly regenerate the sitemap and apply the latest exclusion changes.

This is the fastest way to reflect your updates in the sitemap without waiting for the scheduled cron job.

2. Wait for the Daily Cron Job

SureRank automatically regenerates the sitemap once per day using WordPress cron jobs.

If you don’t have access to WP-CLI or prefer not to run it manually, you can simply wait for the next scheduled cron job. Your sitemap will be updated automatically within 24 hours.

Note: The cron job runs once every day, so changes may take some time to reflect unless manually triggered.

Summary

ActionRequired?Method
Changed Sitemap Excludes?YesRegenerate Sitemap
Regenerate Manually?Optional but fasterwp surerank generate_cache via WP-CLI
Auto Regeneration?Yes (every 24 hours)Via WordPress cron

By following the above steps, you can ensure that your sitemap remains clean, accurate, and SEO-optimized according to your exclusions.

Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

Need help? Contact Support
On this page
Scroll to Top