How to Create and Submit an XML Sitemap (Step-by-Step)

Learn how to create and submit an XML sitemap so Google finds all your pages — with exact steps for WordPress, Wix, Squarespace, Webflow, Shopify and custom sites.

Nasir Uddin
Nasir UddinSEO & Growth Lead · ScoutRival
How to Create and Submit an XML Sitemap (Step-by-Step) — cover
On this page

If ScoutRival’s SEO Score flagged “Publish an XML sitemap,” search engines couldn’t find a sitemap for your site. Adding one helps Google discover your pages faster and is a simple, one-time setup on every major platform. Here’s how.

What is an XML sitemap?

An XML sitemap is a machine-readable file that lists the URLs on your website you want search engines to crawl and index. It’s written in XML (a structured format search engines understand) and usually lives at yoursite.com/sitemap.xml.

If robots.txt is the “which rooms are open” sign, the sitemap is the building directory — it hands search engines a clean list of every page that matters, so they don’t have to find them all by clicking around. That’s especially valuable for:

  • Brand-new sites with few external links pointing at them.
  • Large sites where some pages are buried several clicks deep.
  • Recently published pages you want indexed quickly.

A basic sitemap entry looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://yoursite.com/</loc>
    <lastmod>2026-07-08</lastmod>
  </url>
  <url>
    <loc>https://yoursite.com/about</loc>
    <lastmod>2026-07-08</lastmod>
  </url>
</urlset>

Good news: you almost never have to write this by hand — your platform builds it for you.

Why an XML sitemap matters for SEO

Search engines discover pages in two main ways: by following links, and by reading sitemaps. Relying on links alone means:

  • New content can sit un-crawled for days or weeks.
  • Orphan pages (ones nothing links to) may never be found.
  • Google spends its limited crawl time inefficiently.

A sitemap fixes all three by handing over a definitive list. It doesn’t guarantee indexing — Google still decides what’s worth including — but it dramatically improves discovery, which is the first step to ranking. ScoutRival checks whether a sitemap is present and reachable, because a missing one is a common, easily-fixed gap.

How to check if you already have a sitemap

Try these URLs in your browser — one of them almost certainly exists:

  • https://yoursite.com/sitemap.xml
  • https://yoursite.com/sitemap_index.xml
  • https://yoursite.com/wp-sitemap.xml (WordPress)

If you see a structured list of URLs, you already have a sitemap — skip to submitting it. If every URL 404s, follow your platform’s steps below.

How to create an XML sitemap on any platform

WordPress

WordPress generates a basic sitemap automatically at yoursite.com/wp-sitemap.xml. For a fuller, more controllable one:

  1. Install an SEO plugin like Yoast SEO or Rank Math (either builds and updates a sitemap for you).
  2. In Yoast, your sitemap lives at /sitemap_index.xml — you can view it under SEO → General → Features → XML sitemaps. In Rank Math, enable it under Sitemap Settings.
  3. The plugin keeps the sitemap updated automatically as you publish new content.

Wix

Wix creates and maintains your sitemap automatically:

  1. Visit https://yoursite.com/sitemap.xml to confirm it’s there.
  2. There’s nothing to build — Wix updates it whenever you add or change pages. Move straight to submitting it in Search Console.

Squarespace

Squarespace also generates a sitemap for you automatically:

  1. Confirm it at https://yoursite.com/sitemap.xml.
  2. It updates itself as your site changes. To keep a page out of the sitemap, set that page to hidden or disable its search-engine indexing in Page Settings → SEO.

Webflow

Webflow can auto-generate a sitemap:

  1. Open Project Settings → SEO tab.
  2. Turn on “Auto-generate sitemap.”
  3. Click Save, then Publish. Your sitemap will be available at yoursite.com/sitemap.xml. (If you need a custom sitemap, you can paste your own in the same settings area.)

Shopify

Shopify builds and updates your sitemap automatically:

  1. Find it at https://yoursite.com/sitemap.xml — it links out to sub-sitemaps for products, collections, pages and blogs.
  2. No setup needed; just submit it to Google. Note that on some plans, hidden or password-protected content is excluded automatically.

Any other website (custom or unlisted CMS)

If your site is hand-built or uses a builder without automatic sitemaps:

  1. Generate one at build time (most static-site frameworks have a sitemap plugin) or use a free online sitemap generator for small sites.
  2. Save the file as sitemap.xml and upload it to your web root, so it’s reachable at yoursite.com/sitemap.xml.
  3. Include only live, indexable URLs — no redirects, error pages, or noindexed pages.

How to submit your sitemap to Google

Creating the sitemap is half the job; telling search engines about it is the other half.

  1. Add it to robots.txt. Include this line (with your real domain) so any crawler finds it:
Sitemap: https://yoursite.com/sitemap.xml

New to that file? See our guide on how to add a robots.txt file.

  1. Submit it in Google Search Console. Go to Sitemaps in the left menu, enter sitemap.xml, and click Submit. Google will report how many URLs it discovered and any errors.
  2. (Optional) Submit to Bing Webmaster Tools the same way to cover Bing and, indirectly, some AI search engines.

How to confirm it’s working

  • Reload yoursite.com/sitemap.xml and check it lists your real, live pages.
  • In Search Console → Sitemaps, confirm the status reads “Success” and the discovered-URL count looks right.
  • Re-run your ScoutRival SEO audit — the “Publish an XML sitemap” item should now pass and your Crawlability score should improve.

Common mistakes to avoid

  • Listing broken or redirected URLs. A sitemap full of 404s or redirects erodes trust. Keep it to healthy 200-status pages.
  • Including noindexed pages. Don’t list pages you’ve told Google not to index — it sends a mixed signal.
  • Forgetting to reference it in robots.txt. The sitemap works best when crawlers can find it automatically.
  • Never re-submitting after a big change. Most platforms auto-update, but after a migration or bulk change, re-check the sitemap and its Search Console status.
  • Submitting the wrong file. Some builders use sitemap_index.xml or wp-sitemap.xml — submit whichever URL actually loads.

The bottom line

An XML sitemap is your site’s directory for search engines. On almost every platform it already exists or takes one toggle to enable — the real win is confirming it’s there, adding it to robots.txt, and submitting it in Google Search Console so your pages get discovered fast.

Want a prioritised list of exactly which crawl and indexing fixes will move your score the most? Run a free SEO Score with ScoutRival and get plain-English steps for your entire site.

Frequently asked questions

What is an XML sitemap?
An XML sitemap is a machine-readable file that lists the pages on your website you want search engines to crawl and index. It usually lives at yoursite.com/sitemap.xml and helps engines discover pages faster, especially new, deep, or poorly-linked ones.
Do I need to create an XML sitemap manually?
Usually not. WordPress, Wix, Squarespace, Webflow and Shopify generate and update a sitemap automatically. You mainly need to confirm it exists, reference it in robots.txt, and submit it in Google Search Console.
Where is my sitemap located?
Most sitemaps are at yoursite.com/sitemap.xml. Some platforms use yoursite.com/sitemap_index.xml (common with Yoast SEO) or yoursite.com/wp-sitemap.xml (WordPress core). Try each URL to find yours.
How do I submit a sitemap to Google?
Open Google Search Console, click Sitemaps in the left menu, enter your sitemap path (such as sitemap.xml), and click Submit. Google will then report how many URLs it found and flag any errors.
Does an XML sitemap improve my rankings?
Not directly. A sitemap improves discovery — it helps Google find and crawl your pages — which is a prerequisite for ranking. It doesn't force indexing or boost rankings on its own.
What should I include in my sitemap?
Only live, indexable URLs that return a 200 OK status. Exclude broken pages, redirects, and pages you've set to noindex, since mixing those in sends conflicting signals to search engines.
How often should I update my sitemap?
On most platforms it updates automatically as you publish. After a site migration or a large batch of changes, re-check the sitemap and its status in Google Search Console to make sure it reflects your current pages.
Nasir Uddin
Nasir Uddin SEO & Growth Lead · ScoutRival

Nasir Uddin is an SEO consultant and ScoutRival's SEO & Growth Lead. He's spent years helping small businesses climb the search results — and now the AI answers too — and writes about SEO, AI-search visibility, and turning organic traffic into real growth.

Your unfair advantage

Stop reading about it. Ship it this week.

ScoutRival turns competitor intel into ready-to-post content and graphics — for a fraction of an agency.