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.
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.xmlhttps://yoursite.com/sitemap_index.xmlhttps://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:
- Install an SEO plugin like Yoast SEO or Rank Math (either builds and updates a sitemap for you).
- 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. - The plugin keeps the sitemap updated automatically as you publish new content.
Wix
Wix creates and maintains your sitemap automatically:
- Visit
https://yoursite.com/sitemap.xmlto confirm it’s there. - 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:
- Confirm it at
https://yoursite.com/sitemap.xml. - 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:
- Open Project Settings → SEO tab.
- Turn on “Auto-generate sitemap.”
- 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:
- Find it at
https://yoursite.com/sitemap.xml— it links out to sub-sitemaps for products, collections, pages and blogs. - 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:
- Generate one at build time (most static-site frameworks have a sitemap plugin) or use a free online sitemap generator for small sites.
- Save the file as
sitemap.xmland upload it to your web root, so it’s reachable atyoursite.com/sitemap.xml. - 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.
- 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.
- 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. - (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.xmland 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.xmlorwp-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?
Do I need to create an XML sitemap manually?
Where is my sitemap located?
How do I submit a sitemap to Google?
Does an XML sitemap improve my rankings?
What should I include in my sitemap?
How often should I update my sitemap?
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.
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.