The XML Sitemap Generator converts a list of absolute HTTP and HTTPS page URLs into one standards-based XML sitemap file that you can publish directly. The workflow runs entirely in the browser: paste your URLs, optionally apply shared lastmod, changefreq, or priority values, generate the XML, and download sitemap.xml to host on your site. Yoast SEO already creates an XML sitemap for WordPress sites automatically, so the practical question of how to create an XML sitemap in Yoast really has two answers: let Yoast handle it, or build your own curated file when Yoast's default is not the right fit. Both approaches use the same sitemap protocol, so a hand-built file from the generator looks identical in shape to anything Yoast emits, and search engines will read either source the same way.

What Yoast SEO's Built-In Sitemap Feature Does
Yoast SEO has shipped an XML sitemap feature since version 5.x, exposed under SEO → General → Features. When you flip the XML sitemaps switch on, Yoast registers a sitemap index at /sitemap.xml (with a /sitemap_index.xml mirror in some setups) and one sub-sitemap per content type: posts, pages, categories, tags, authors, plus any custom post types or taxonomies you have enabled. The plugin decides which URLs appear by querying the WordPress database for published content, threading in the canonical URL it has stored, and skipping entries it knows are noindex. You can tune the output under SEO → General → XML sitemaps, where you toggle post types, exclude specific posts by ID, and switch the author or date archives on or off.
The plugin does not crawl — it reads the WordPress database — so the sitemap reflects the state of your posts table at the moment a crawler asks for it. That is the practical answer to how to create an XML sitemap in Yoast for most WordPress sites: enable the feature, confirm the types you want, and submit the resulting index URL in Search Console or list it in your robots.txt as recommended by the Google Search Central sitemap guide. The sitemaps.org protocol that Yoast follows defines an XML file as a list of URLs plus optional metadata, which is exactly what the XML Sitemap Generator produces when you paste URLs by hand.
When a Custom XML Sitemap Is the Better Choice
There are situations where Yoast's auto-generated sitemap is not the right fit and a curated list-to-XML workflow makes more sense. Three common cases come up in real audits:
- You want a single sitemap that mixes WordPress URLs with hand-picked landing pages, partner pages, or PDF documents that live outside the post loop.
- You run a static or headless site that does not use WordPress but still wants a protocol-compliant sitemap.
- You are auditing or migrating a site and need to publish a fixed sitemap that does not change as the database changes underneath it.
In each case the goal is the same: hand the search engine a clean list of URLs you have already reviewed, wrapped in XML that follows the sitemaps.org protocol. The XML Sitemap Generator is built for exactly this list-to-XML pattern, and the practical guide to creating an XML sitemap walks through the wider workflow including audit and submission steps.
How to Build a Sitemap From a URL List
Follow these steps to convert a reviewed list of page URLs into a single standards-based sitemap file you can host on your site.
- Open the XML Sitemap Generator in your browser. Nothing is uploaded; the page runs in the current tab.
- Paste one absolute HTTP or HTTPS page URL per line in the URL list area. Use one host per file — for example, all entries on example.com or all on example.com:8443. Bare domains, relative paths, fragments, and credentials are rejected.
- Leave the optional lastmod, changefreq, and priority fields blank if you want a loc-only sitemap. If a single value is truthful for every URL (for instance, weekly for a blog index), fill it in. A wrong shared value is worse than no value at all.
- Click Generate. The tool validates every line, normalizes URLs with the browser URL parser, deduplicates in first-seen order, XML-escapes the data, and reports counts plus the finished XML in the preview.
- Download sitemap.xml and host it at the root of the represented site, or in a folder you reference from a sitemap index. The download is revoked the moment you edit a URL or option, so generate again if anything changes.
Protocol Rules and Tool Limits Worth Knowing
The sitemaps.org protocol sets the upper limits at 50,000 URLs and 50 MiB uncompressed per file. The XML Sitemap Generator works inside the browser and uses tighter whole-file budgets so the preview, Blob, and download do not stall on huge inputs. The table below shows the practical limits compared with the protocol maxima, plus what happens when a cap is hit.
| Limit | Protocol maximum | Generator cap | What happens at the cap |
|---|---|---|---|
| Unique URLs per file | 50,000 | 10,000 | 10,000th URL is accepted; the next unique URL fails the whole generation. |
| Uncompressed file size | 52,428,800 bytes | 10,485,760 bytes (UTF-8 XML) | Exact cap is accepted; one byte more fails. |
| Serialized location length | 2,047 characters | 2,047 characters | A normalized location longer than 2,047 characters is rejected. |
| Input size | Not specified | 5,000,000 UTF-16 code units | Larger input is rejected before parsing. |
Limits are all-or-nothing: nothing is silently truncated, no preview is shortened, and the download button is revoked the moment you edit a URL or option. Optional fields follow the same strict approach — a bad date, a misspelt changefreq, or a priority outside 0.0 through 1.0 fails the whole generation rather than being quietly dropped. Duplicate lines do not consume output slots, and invalid lines never get skipped: the validation result tells you exactly which line failed and why.
Mistakes to Fix Before Publishing a Custom Sitemap
Even with a clean URL list, several small errors will break a sitemap or hide it from crawlers. Five patterns show up over and over.
- Mixing hosts in one file. example.com and example.com:8443 are different serialized hosts because the port is part of the host identity. Put non-default-port URLs in a separate file or merge them into a sitemap index instead.
- Including fragments or credentials. Fragments (#section) are stripped by HTTP and should not create multiple entries; credentials in a URL would expose a username and password in a public file. Both are rejected at validation.
- Setting a shared lastmod that is not actually true. A single 2026-01-15 date applied to 8,000 URLs tells crawlers those 8,000 pages were meaningfully edited on the same day. Leave lastmod blank unless the same value is honest across every entry.
- Trusting the tool to verify pages. The generator never visits a URL, never checks a status code, and never reads a canonical tag. Review redirects, noindex entries, blocked pages, and private pages before you publish.
- Skipping Search Console. The generator does not submit the file anywhere. Submitting /sitemap.xml in Search Console, or listing it in robots.txt, is still on you after the file lands on the represented host.
Yoast's auto-generated sitemap and a hand-built file are both valid choices; the goal in either case is the same: a small, honest list of URLs that search engines can crawl without surprises. The XML Sitemap Generator handles the list-to-XML conversion in your browser; the URL selection and submission stay your responsibility.