How to Create a Sitemap: CMS, Manual and Generator Options

How to create an XML sitemap on WordPress, Shopify, Wix or by hand, stay within the 50,000 URL and 50MB limits, use index files and submit to Google and Bing.

By the MakeItFlow team Updated 8 min read
Share LinkedIn X Facebook WhatsApp
How to Create a Sitemap: CMS, Manual and Generator Options

To create a sitemap, first check whether your platform already makes one: WordPress, Shopify, Wix and Squarespace all generate an XML sitemap automatically. If yours doesn't, use a sitemap generator or write the XML by hand, list only canonical URLs, then submit it in Google Search Console and Bing Webmaster Tools.

That's the short version. The rest of this guide covers where to find your existing sitemap, how to build one when you need to, the limits that catch out larger sites, and the mistakes that make a sitemap less useful. If you want to know what to include and how Google treats lastmod, our XML sitemap guide goes deeper on that side.

Key takeaways

  • Most CMS platforms already create a sitemap for you, so check yoursite.com/sitemap.xml before building one.
  • Each sitemap can hold up to 50,000 URLs or 50MB uncompressed; larger sites split into several files listed in a sitemap index.
  • List only canonical, indexable URLs that return 200, using full absolute addresses.
  • Submit it in Google Search Console and Bing Webmaster Tools, and add a Sitemap line to robots.txt; Google's old ping endpoint no longer works.

Do you need a sitemap?

Google's documentation says a sitemap is most useful for sites that are large, new with few external links, or have lots of content that isn't well linked internally. A small, well-linked brochure site can be crawled perfectly well without one.

That said, a sitemap costs nothing, helps search engines find new pages sooner, and gives you useful reporting in Search Console. For almost every business site, it's worth having.

Step 1: Check whether you already have one

Try these addresses on your domain:

Platform Default sitemap location Notes
WordPress (no SEO plugin) /wp-sitemap.xml Built into WordPress core since version 5.5
WordPress with Yoast SEO /sitemap_index.xml The plugin replaces the core sitemap
WordPress with Rank Math /sitemap_index.xml Configurable per post type
Shopify /sitemap.xml Generated automatically, includes products, collections, pages and blog posts
Wix /sitemap.xml Generated automatically once the site is published
Squarespace /sitemap.xml Generated automatically
Webflow /sitemap.xml Auto-generation can be turned on in SEO settings

Also check your robots.txt file at /robots.txt. Many platforms add a Sitemap: line pointing to the right file. Our free sitemap checker will find and validate it for you, including whether the URLs inside return 200.

If you find one, you probably don't need to build another. Skip to step 4 and submit it.

Step 2: Choose how to create your sitemap

If your platform doesn't create one, or you have a custom-built or static site, you have three options.

Option A: Use a sitemap generator

For small to medium sites, a generator is the quickest route. Our free XML sitemap generator turns a pasted list of URLs or a CSV into a valid sitemap. It cleans and de-duplicates the URLs, adds lastmod, and splits large lists into several files with a sitemap index. Export your page list from your CMS, a crawler or a spreadsheet, paste it in, then upload the file to your web root.

Generators work well for static sites and sites that don't change often. The downside is that the file doesn't update itself. If you add pages regularly, you'll need to regenerate it, or move to a dynamic option.

Option B: Let your framework or CMS build it dynamically

Most modern frameworks have a sitemap package or built-in feature: Laravel, Next.js, Django, Ruby on Rails, Gatsby, Hugo and others. A dynamic sitemap is generated from your database or content files, so it's always current. If you have a developer, this is the best long-term option.

Option C: Write it by hand

For a site with a handful of pages, a hand-written sitemap is fine. Here's the minimum:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/</loc>
    <lastmod>2026-11-02</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/services/boiler-repair</loc>
    <lastmod>2026-10-18</lastmod>
  </url>
</urlset>

The sitemaps.org protocol requires the <urlset> root with that namespace, a <url> entry for each page and a <loc> inside each one. Everything else is optional. Save it as UTF-8 and upload it to the root of your site, so it's reachable at https://www.example.com/sitemap.xml.

Step 3: Follow the rules that matter

Size limits

Google's sitemap documentation and the sitemaps.org protocol set the same limits:

  • 50,000 URLs per sitemap file, or
  • 50MB uncompressed per file, whichever comes first.

You can gzip a sitemap to save bandwidth, but the uncompressed size must still be under 50MB.

Sitemap index files for larger sites

If you exceed either limit, split your URLs across several sitemaps and list them in a sitemap index:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.com/sitemap-pages.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://www.example.com/sitemap-products-1.xml</loc>
  </sitemap>
</sitemapindex>

According to Google's guide to managing large sitemaps, an index can list up to 50,000 sitemaps, and you can submit up to 500 index files per site in Search Console. Splitting by content type (pages, products, blog posts) is useful even on smaller sites, because Search Console then reports indexing for each group separately.

URL rules

  • Use full absolute URLs. https://www.example.com/about, not /about. Google crawls URLs exactly as listed.
  • Match your preferred version. If your site is https:// without www, every URL must be too. A sitemap can only list URLs on the same host and protocol as the sitemap itself.
  • Escape special characters. An ampersand in a URL must be written as &amp;.
  • Keep each URL under 2,048 characters.

What to include and leave out

Include only pages you want to appear in search:

  • Canonical URLs that return 200 OK.
  • Pages that aren't noindexed or blocked by robots.txt.

Leave out redirects, 404s, noindexed pages, duplicate URLs with tracking parameters, internal search results, cart and account pages, and thin tag archives. A sitemap full of URLs Google can't or shouldn't index sends mixed signals.

Optional tags

Google ignores <priority> and <changefreq>. It uses <lastmod> only when it's consistently accurate, meaning it changes when the main content changes, not every time someone updates the copyright year in the footer. If your system can't track real modification dates, leave lastmod out rather than faking it.

Step 4: Submit your sitemap

Google Search Console

  1. Open your property in Search Console.
  2. Go to Indexing > Sitemaps.
  3. Enter the sitemap URL (or the index file) and click Submit.
  4. Check back for the status. "Success" means Google could read it. The report also shows how many URLs were discovered.

New to Search Console? Our beginner's guide covers verification and the main reports.

Bing Webmaster Tools

Bing powers several other search and AI services, so it's worth the five minutes. In Bing Webmaster Tools, go to Sitemaps and submit the same URL. You can also import your site directly from Search Console. See our Bing Webmaster Tools setup guide.

robots.txt

Add a line to your robots.txt file so any crawler can find the sitemap:

Sitemap: https://www.example.com/sitemap.xml

You can list several sitemaps on separate lines. The robots.txt generator adds this for you.

What about pinging?

Google retired its sitemap ping endpoint after announcing its deprecation in June 2023. Requests to it no longer do anything. Submit through Search Console and robots.txt, and keep lastmod accurate. For faster notification on Bing and other participating engines, look at IndexNow, covered in our guide to automating indexing with IndexNow and sitemaps.

Common sitemap mistakes

Mistake Why it matters Fix
Sitemap lists http:// or www URLs that redirect Every listed URL redirects, wasting crawls Regenerate using your canonical domain
Noindexed pages in the sitemap Contradictory signals Exclude noindexed post types and taxonomies
Static sitemap never updated New pages are missing Switch to a dynamic sitemap or regenerate after changes
lastmod set to today on every URL Google learns to ignore it Use real modification dates or omit it
Staging or dev URLs included Exposes test sites and wastes crawls Generate from the live site only
Sitemap blocked by robots.txt or a login Crawlers can't read it Make it publicly accessible

After you submit

Check the Sitemaps report a few days later. Then look at the Page indexing report, filtered by sitemap, to see which listed URLs are indexed and which aren't. If important pages are missing, our guide to why a page is not indexed gives you a step-by-step diagnosis.

Re-check your sitemap after any site migration, theme change or SEO plugin switch, because those are the moments it most often breaks. Make It Flow's free tools make that a two-minute job.

FAQ

How do I create a sitemap for free?

Check first whether your platform creates one automatically, as WordPress, Shopify, Wix and Squarespace do. If not, paste your list of page URLs into a free sitemap generator and download the XML file, then upload it to your site's root folder. For a few pages, you can write the XML by hand in any text editor.

Where should I put my sitemap file?

Put it in the root of your site, so it's at an address like yoursite.com/sitemap.xml. A sitemap can only include URLs at or below its own folder, so the root covers the whole site. Then reference it in robots.txt and submit it in Search Console and Bing Webmaster Tools.

How many URLs can a sitemap contain?

Up to 50,000 URLs, or 50MB uncompressed, whichever limit you reach first. If your site is bigger, split it into several sitemaps and list them in a sitemap index file. An index can reference up to 50,000 sitemaps.

Do I need to resubmit my sitemap every time I add a page?

No. Once Google knows where your sitemap is, it rechecks it periodically. Just make sure the sitemap updates when you add pages, which dynamic CMS sitemaps do automatically. If you use a generated static file, regenerate and re-upload it after adding content.

Should I include images and PDFs in my sitemap?

You can include PDFs as normal URLs if you want them indexed. Images can be listed using Google's image sitemap extension, which can help with images loaded in ways Google might otherwise miss. For most small sites, images in standard HTML with good alt text are found without it.

Does a sitemap improve rankings?

Not directly. A sitemap helps search engines discover and recrawl your pages, but it doesn't make them rank higher. Pages still need useful content, good internal links and no technical blocks. Think of it as making sure Google knows what exists, not as a ranking boost.

#how to create a sitemap #xml sitemap #search console #technical seo

Written by the MakeItFlow team

We build the website audit these guides are based on. Every fact is checked against the primary sources listed above and this guide was last reviewed on 31 October 2026 . How we research and check

Share LinkedIn X Facebook WhatsApp

Check your own site in 30 seconds

Run a free audit covering speed, SEO, DNS, email authentication and security headers — and get a prioritised fix list.

Weekly newsletter

One practical website fix, every week

New guides on speed, SEO, email deliverability and security — straight to your inbox. No spam, unsubscribe in one click.

Keep reading