SEO & AI search · Guide
How to Generate Sitemap in Yoast SEO (Step by Step)

Short answer
Yoast SEO creates your XML sitemap automatically. Go to Yoast SEO, then Settings, then Site features, and make sure XML sitemaps is switched on. Your sitemap index then appears at sitemap_index on your domain, ready to submit to Google Search Console.
Key takeaways
- Yoast builds the sitemap automatically; there is no generate button.
- Turn it on under Yoast SEO, Settings, Site features.
- The index lives at sitemap_index.xml on your domain.
- Content set to hide from search results is left out of the sitemap.
- Submit the index URL in Google Search Console and Bing.
How do you generate a sitemap in Yoast SEO?
Yoast SEO generates your XML sitemap automatically once the plugin is active; check that XML sitemaps is switched on under Yoast SEO > Settings > Site features, then open yoursite.com/sitemap_index.xml to see it.
There is no Generate button to press. Yoast builds the sitemap on the fly and updates it every time you publish, edit or delete content.
Your job is to make sure the feature is on, decide what to include, and tell search engines where the sitemap lives.
If you are not sure what a sitemap does, read what an XML sitemap is first. The rest of this guide shows each step.
How do you turn on XML sitemaps in Yoast SEO?
Go to Yoast SEO > Settings, open Site features, scroll to the APIs or technical section, and make sure the XML sitemaps toggle is on, then click Save changes.
- Log in to your WordPress dashboard.
- Install and activate the Yoast SEO plugin if you have not already.
- Go to Yoast SEO > Settings.
- Click Site features in the left menu.
- Find the XML sitemaps card and switch it on.
- Click Save changes.
The card also has a View the XML sitemap link. Click it to open your sitemap in a new tab.
If the toggle is greyed out, another plugin may be controlling sitemaps. Our guide to Yoast SEO sitemap settings explains each related option.
Where is the Yoast sitemap URL?
The Yoast sitemap lives at yoursite.com/sitemap_index.xml, which is an index file linking to separate sitemaps for posts, pages, categories, authors and other content types.
Open it in a browser and you will see a list like this:
- post-sitemap.xml for your blog posts
- page-sitemap.xml for your pages
- category-sitemap.xml for category archives
- author-sitemap.xml for author archives, if enabled
- product-sitemap.xml if WooCommerce is active
Each child sitemap holds up to 1,000 URLs by default. Larger sites get extra files, such as post-sitemap2.xml.
The index format follows the standard sitemaps protocol, which all major search engines support.
When Yoast is active, it turns off the basic sitemap that WordPress core adds at wp-sitemap.xml. That avoids two competing sitemaps.
How do you choose what goes in the Yoast sitemap?
Yoast includes a content type in the sitemap only when it is set to show in search results, so control the sitemap by switching Show in search results on or off for each content type and taxonomy.
- Go to Yoast SEO > Settings.
- Under Content types, click Posts, Pages or any custom post type.
- Switch Show posts in search results on to include them, or off to exclude them.
- Repeat under Categories & tags for taxonomies.
- Click Save changes.
For example, if you do not want tag archives indexed, turn off Show tags in search results. The tag sitemap disappears from the index.
Author archives are under Advanced > Author archives. Single-author blogs often turn them off, as they duplicate the main blog.
Custom post types from plugins appear in the same Content types list. Events, portfolios, courses and WooCommerce products each get their own switch, so you can decide one by one whether they belong in search.
Media attachment pages are a common trap. Yoast redirects attachment URLs to the file itself by default on new installs, which keeps thin attachment pages out of your sitemap. Leave that setting on unless you have a clear reason to index attachment pages.
How do you remove a single page from the Yoast sitemap?
To remove one page or post, open it in the editor, go to the Yoast panel's Advanced section, set Allow search engines to show this content in search results to No, and update the page.
That adds a noindex tag and removes the URL from the sitemap at the same time.
Use this for thank-you pages, login pages, private landing pages and thin content you do not want in search.
Do not noindex important pages by mistake. Check the setting if a page drops out of search unexpectedly.
How do you submit the Yoast sitemap to Google?
Open Google Search Console, select your property, go to Sitemaps, type sitemap_index.xml in the Add a new sitemap box, and click Submit.
- Verify your site in Google Search Console if you have not already.
- Choose your property from the top-left menu.
- Click Sitemaps under Indexing.
- Enter sitemap_index.xml after your domain.
- Click Submit.
Search Console then shows the status and how many URLs it discovered. Google's Sitemaps report help explains each status.
Submitting does not guarantee indexing. It helps Google find your pages faster, as covered in Google's guide to building and submitting a sitemap.
Need to set up Search Console first? Follow how to connect Google Search Console to WordPress.
How do you submit the Yoast sitemap to Bing?
In Bing Webmaster Tools, add or import your site, open Sitemaps, click Submit sitemap, and paste the full URL of your sitemap_index.xml file.
You can import your site straight from Google Search Console in Bing Webmaster Tools, which saves verifying it again.
Bing data also feeds other search tools, so it is worth the two-minute setup.
Should you add the sitemap to robots.txt?
Adding a Sitemap line to robots.txt helps crawlers find your sitemap without a manual submission, and recent Yoast versions can add the reference to the virtual robots.txt for you.
Open yoursite.com/robots.txt and look for a line starting with Sitemap:. If it is there, you are done.
If you use a physical robots.txt file, add the line yourself:
Sitemap: https://www.example.com/sitemap_index.xml
Yoast's file editor under Yoast SEO > Tools can edit robots.txt. See how to edit robots.txt in WordPress for other methods.
Why does the Yoast sitemap show a 404 or blank page?
A Yoast sitemap 404 is usually caused by permalink rewrite rules that need refreshing, a caching plugin serving an old page, a conflict with another sitemap plugin, or server rules that block the sitemap URL.
| Problem | Quick fix |
|---|---|
| 404 error | Go to Settings > Permalinks and click Save Changes |
| Old content in the sitemap | Clear your page cache and CDN cache |
| Two sitemaps fighting | Turn off sitemaps in other SEO or sitemap plugins |
| Blank or broken page | Check for PHP errors or whitespace in functions.php |
| Nginx 404 | Add the Yoast rewrite rules to the server config |
Our dedicated guide to fixing the Yoast sitemap 404 has detailed steps for each case.
Exclude sitemap URLs from your page cache. Cached sitemaps can show outdated content to search engines.
How often does the Yoast sitemap update?
The Yoast sitemap updates automatically whenever you publish, update or delete content, and the last modified dates tell search engines which URLs changed.
You do not need to resubmit after every post. Search engines recheck submitted sitemaps on their own schedule.
Images are handled inside the same files. Yoast lists images found in each post alongside its URL, so there is no separate image sitemap to manage.
The Last Mod column in each child sitemap shows when the most recent change happened. If those dates look stale after you publish, a cache layer is almost always the reason.
If you make a big structural change, such as a new URL format, you can resubmit in Search Console to prompt a fresh crawl.
Which Yoast sitemap settings matter most?
The settings that matter most are the XML sitemaps toggle, the Show in search results switches for each content type and taxonomy, per-page noindex controls, and submitting the index URL to search engines.
Get those four right, and your sitemap will list exactly the pages you want found. For general sitemap problems that are not Yoast-specific, see how to fix a sitemap not working.
Check the sitemap after any big change, such as installing a new plugin that adds a content type or switching themes. A two-minute look at sitemap_index.xml catches problems before search engines do.
Frequently asked questions
What is the Yoast sitemap URL?
The Yoast sitemap index is found at your domain followed by sitemap_index.xml. It links to separate sitemaps for posts, pages, categories and any other content types you allow in search results.
Do I need a separate sitemap plugin with Yoast?
No. Yoast SEO creates XML sitemaps on its own and disables the basic WordPress core sitemap. Running another sitemap plugin at the same time can cause conflicts, so use only one sitemap source.
Why is a page missing from my Yoast sitemap?
The page is probably set to noindex, its content type is hidden from search results in Yoast settings, it is not published, or your sitemap is cached. Check the page's Advanced Yoast settings and clear caches.
How do I regenerate the Yoast sitemap?
Switch the XML sitemaps feature off, save, switch it back on and save again. Then resave your permalinks and clear any caches. This rebuilds the sitemap with fresh rewrite rules.
Should I submit every child sitemap to Google?
No. Submit only the sitemap index file. Google reads the index and finds every child sitemap listed in it, including new ones Yoast adds as your site grows.
Sources
- Yoast SEO plugin WordPress.org
- Build and submit a sitemap Google Search Central
- Manage your sitemaps using the Sitemaps report Google Search Console Help
- Sitemaps XML format sitemaps.org
- Bing Webmaster Tools Microsoft Bing
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


