How to Create an XML Sitemap for a Small Website
You published your pages weeks ago, but Search Console still shows half of them as "discovered, currently not indexed" or not at all.

You published your pages weeks ago, but Search Console still shows half of them as "discovered, currently not indexed" or not at all. An XML sitemap will not force Google to rank anything, but it is the simplest way to hand search engines a complete, up to date list of the pages you actually want found.
On a small site, creating one usually takes ten minutes. The harder part is keeping it clean, and that is where most beginners go wrong. Here is how to build an XML sitemap on the common platforms, what belongs in it, and how to submit it.
What an XML sitemap does
An XML sitemap is a plain text file, usually found at /sitemap.xml at the root of your domain, that lists the URLs on your site. Each entry can also carry a last modified date. Search engines read it to discover pages they might otherwise miss and to notice when something has changed.
It matters most when:
- Your site is new and has few links pointing to it from elsewhere.
- Some pages are buried deep, three or more clicks from the home page.
- You publish or update content regularly and want changes picked up sooner.
It matters less on a tiny, well linked five page site, though it still does no harm. Good internal links on a small website remain the main way crawlers find pages. The sitemap is a backup and a signal, not a replacement.
How to create an XML sitemap on popular platforms
WordPress
Since version 5.5, WordPress creates a basic sitemap automatically at /wp-sitemap.xml. If you use an SEO plugin such as Yoast or Rank Math, the plugin replaces it with its own, usually at /sitemap_index.xml. Turn on the plugin's sitemap feature in its settings, then open the address in your browser to confirm it loads. Only one sitemap system should be active, so let the plugin take over.
Website builders
Wix, Squarespace, Shopify and most hosted builders generate a sitemap for you and update it each time you publish. There is nothing to install. Visit /sitemap.xml on your domain to see it. Your job is mainly to set pages you do not want indexed to "hidden from search" in the page settings, which also removes them from the sitemap.
Static sites and hand-coded sites
Static site generators such as Hugo, Eleventy, Jekyll and Astro either build a sitemap by default or offer an official plugin. For a hand-coded site with fewer than 50 pages, you can write the file yourself in a text editor. It needs an XML declaration at the top, a urlset wrapper, and one url block per page containing a loc tag with the full address and an optional lastmod tag with the date in year-month-day format. Save it as sitemap.xml, upload it to the root folder and open it in a browser to check it displays without errors.
For larger hand-built sites, a free desktop crawler such as Screaming Frog can crawl your site and export a sitemap. The free version handles up to 500 URLs.
What to include and what to leave out
A sitemap should list only the pages you want to appear in search results. That sounds obvious, but auto-generated sitemaps often include a lot of noise.
| Include | Leave out |
|---|---|
| Home page and main service pages | Thank you and order confirmation pages |
| Blog posts and articles | Tag pages with only one or two posts |
| Product and category pages | Login, cart and account pages |
| About and contact pages | Pages set to noindex |
| Final URLs after any redirects | Redirected or broken URLs |
Every URL in the sitemap should return a 200 status, be the canonical version of that page and match the exact format your site uses, with or without the trailing slash and always on https. A sitemap full of redirects and 404s tells search engines your list cannot be trusted.
The technical limits are generous: 50,000 URLs or 50 MB uncompressed per file. If you ever exceed that, split it into several files listed in a sitemap index.
The settings you can safely ignore
Many tutorials spend paragraphs on the priority and changefreq tags, telling you to set the home page to 1.0 and blog posts to 0.6, or to mark pages as "daily". I would not spend a minute on them. Google has said publicly that it ignores both values. They were too often set to "high priority, changes daily" on every page to be useful.
What Google does use is lastmod, but only if it is accurate. If your sitemap tool updates the date every time the page is regenerated, even when nothing changed, the signal becomes worthless. Set lastmod to change only when the content meaningfully changes. Honest dates are worth more than any priority number.
How to submit your sitemap
- Open Google Search Console and select your property. If you have not set it up yet, follow our guide to setting up Google Search Console first.
- Click "Sitemaps" in the left menu.
- Type the sitemap path, such as sitemap.xml, into the box and press Submit.
- Check back after a day or two. The status should read "Success" with a count of discovered pages.
Also add a line to your robots.txt file that reads Sitemap: followed by the full address of your sitemap. Bing and other search engines read this line, so you get discovery beyond Google without extra work. Bing Webmaster Tools also lets you import your Search Console settings in a few clicks.
Checking that it works over time
Once a month, look at the Pages report in Search Console. Compare the number of pages submitted in your sitemap with the number indexed. A gap of a few pages is normal on a new site. A large gap usually means thin or duplicate content, pages blocked by robots.txt, or URLs in the sitemap that redirect. Fix the cause rather than resubmitting the sitemap over and over, which changes nothing.
If you are just starting out, SEO basics for a new website covers the other foundations that work alongside a sitemap.
Frequently asked questions
Does every website need an XML sitemap?
Not strictly, but almost every site benefits from one. Small, well linked sites can be crawled fine without it. New sites, large sites and sites with pages that few others link to gain the most.
How often should I update my sitemap?
It should update automatically whenever you publish, remove or significantly change a page. Most CMS platforms and plugins handle this. If you maintain it by hand, update it every time you add or delete a page.
Does submitting a sitemap guarantee indexing?
No. A sitemap helps search engines find your pages, but they still decide which ones to index based on quality and usefulness. Thin, duplicate or blocked pages may be discovered and still left out.
More in SEO
SEO
How to Write a robots.txt File for a Small Website
Someone on a forum tells you your site needs a robots.txt file, so you paste in a block of rules you found, upload it, and move...
SEO
How to Fix Crawled Currently Not Indexed Pages in Google
You open the Pages report in Google Search Console and find 37 URLs sitting under "Crawled, currently not indexed." Google...
SEO
How to Set Up 301 Redirects When You Change a URL
You tidy up your site. A page called /services-page-2 becomes /web-design , an old blog post gets a cleaner address, and a...