How to Create and Submit an XML Sitemap
An XML sitemap is a plain list of the pages you want search engines to know about. Visitors never see it. Google can find pages by following links anyway, so a small, well-linked site without one isn't in trouble, but a sitemap makes sure new and deeply buried pages are found sooner. Site Audit flags it as a warning when it can't find one.
Most platforms make one for you, so start by finding yours.
Find the one you already have
| Platform | Where to look |
|---|---|
| WordPress on its own | yoursite.com/wp-sitemap.xml |
| WordPress with Yoast or Rank Math | yoursite.com/sitemap_index.xml (switch the sitemap on in the plugin's settings) |
| Shopify | yoursite.com/sitemap.xml |
| Wix | yoursite.com/sitemap.xml, once the site is published on a domain |
| Squarespace | yoursite.com/sitemap.xml |
Open the address in your browser. You should see a list of page addresses, or a short list of smaller sitemaps that each hold some of your pages. Both are fine.
If you built the site by hand or with a less common tool, your developer can generate one, or a free online generator can crawl your site and make a file to upload. A file made once goes out of date as soon as you add a page, so an automatic one is better if you can get it.
What belongs in it
A sitemap should list only the pages you want people to find in Google. Leave out:
- pages marked noindex
- addresses that redirect somewhere else
- broken pages
- thank-you, basket, checkout and account pages
Plugins and site builders mostly handle this. The one to watch is a page you hid with noindex but your plugin still lists, because it sends Google two opposite instructions.
What ours looks like
This site has no plugin: a small script builds every page and writes the sitemap at the same time, so a new guide or blog post appears in it on the day it goes live. In October 2026 it listed 46 addresses. The thank-you page behind our contact form is marked noindex and kept out of the list.
Our robots.txt file is three lines long:
User-agent: *
Allow: /
Sitemap: https://getduality.com/sitemap.xml
The last line points every search engine at the sitemap, including ones you never submit it to. The first two say every crawler may read every page. There's deliberately no Disallow line. We use noindex to keep a page out of Google, and Google can only see a noindex tag on a page it is allowed to read. Blocking the same page in robots.txt would hide the very instruction we want it to follow. The robots.txt guide goes into that file in more detail.
Submit it to Google and Bing
- Google Search Console. Open your property, choose Sitemaps in the menu, paste the sitemap's full address and press Submit. After Google has read it, the same screen shows whether it succeeded and how many pages it discovered.
- Bing Webmaster Tools. Bing can import your site from Search Console and bring the sitemap with it, which is how we set ours up. Otherwise add the sitemap under Sitemaps there.
You only submit once. When the file changes, Google comes back to it by itself.
When Search Console reports a problem
"Couldn't fetch" usually means the address was mistyped, or the file is blocked by robots.txt or a security plugin. Open the exact address in a private browser window: if you can't see it, neither can Google. If it reads the file but complains about individual addresses, they are usually pages that redirect or no longer exist. Fix the pages, or check why your plugin still lists them.
Confirming the fix
Sitemaps belong to the whole site rather than a single page, so Duality's next monthly audit confirms the change. Until then, the Sitemaps screen in Search Console is the quickest check.