How to Create an XML Sitemap (Step by Step)

Create a sitemap for any website — WordPress, Shopify, Wix or a custom site — and get it ready for Google in minutes.

How to Create an XML Sitemap (Step by Step)
Contents
  1. Before you start: does your site already have a sitemap?
  2. How to create a sitemap on popular platforms
  3. Method 1: Create a sitemap with a free generator
  4. Method 2: Create a sitemap from a list of URLs
  5. Method 3: Write the sitemap by hand
  6. Step 4: Upload the sitemap to your website
  7. Step 5: Check the sitemap for errors
  8. Step 6: Tell search engines about it
  9. Keep your sitemap up to date

Want to create an XML sitemap for your website? The good news: most platforms make one for you, and for every other site you can generate one in a few minutes without installing anything. This guide shows you how to find or create a sitemap on WordPress, Shopify, Wix, Squarespace and Blogger, and how to make one for a custom-built website.

Before you start: does your site already have a sitemap?

Many website builders and CMSs create a sitemap automatically. Before making a new one, check whether yours already exists — open https://yourdomain.com/sitemap.xml in your browser, or enter your domain in our free sitemap finder, which checks robots.txt and 30 common locations at once.

PlatformSitemap addressWhat you need to do
WordPress (built-in)/wp-sitemap.xmlNothing — WordPress 5.5 and newer create it automatically.
WordPress + Yoast SEO/sitemap_index.xmlTurn on XML sitemaps in Yoast’s settings (on by default).
WordPress + Rank Math/sitemap_index.xmlEnable the Sitemap module.
Shopify/sitemap.xmlNothing — created and updated automatically.
Wix/sitemap.xmlNothing — generated automatically once your site is published.
Squarespace/sitemap.xmlNothing — generated automatically.
Blogger/sitemap.xmlNothing — Blogger publishes one for your posts. Set it up with our Blogger Sitemap Generator.

If your platform already makes a sitemap, skip straight to submitting it to Google Search Console. If not — or if you have a custom, static or hand-coded website — use one of the methods below.

Method 1: Create a sitemap with a free generator

This is the fastest way for any website. Our XML sitemap generator crawls your site like a search engine and builds the file for you:

  1. Enter your homepage address, for example https://example.com. Use the exact version visitors see — https, and with or without www.
  2. Choose your options. Set the maximum number of pages, keep Last modified date on, and tick Include images if images matter for your site. Large sites can tick Split by type to get separate files for pages, posts and categories.
  3. Click Generate Sitemap. Pages appear in real time as they are found. Redirects, error pages and noindex pages are left out automatically.
  4. Download sitemap.xml — or the ZIP file if you chose to split.

Method 2: Create a sitemap from a list of URLs

If your site cannot be crawled — for example, it is behind a login, still in development, or most links load with JavaScript — you can build a sitemap from a list instead. In the generator, open the Paste URLs tab, paste one address per line and download the file. Make sure every URL is the full, final address you want in Google.

Method 3: Write the sitemap by hand

For a very small site you can write the file yourself in any text editor. Save it as sitemap.xml with UTF-8 encoding:

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

Remember to write special characters correctly — an & in a URL must be written as &amp;, or the whole file becomes invalid. For the meaning of every tag, see our guide What Is an XML Sitemap?

Step 4: Upload the sitemap to your website

  1. Open your hosting file manager or FTP client (cPanel, Plesk, FileZilla and similar).
  2. Upload sitemap.xml to your root folder — usually public_html or www — so it opens at https://yourdomain.com/sitemap.xml. If you split your sitemap, upload every .xml file.
  3. Open the address in your browser to confirm it loads and shows XML, not an error page.

Step 5: Check the sitemap for errors

A single mistake can stop Google from reading the whole file. Run it through our free sitemap checker: it validates the XML, every URL and every date, and can test a sample of the listed pages for errors, redirects and noindex tags.

Step 6: Tell search engines about it

Finally, submit the sitemap in Google Search Console and Bing Webmaster Tools, and add a Sitemap: line to your robots.txt so every search engine can find it. Our guide to submitting a sitemap to Google walks you through each screen.

Keep your sitemap up to date

A sitemap is only useful if it matches your site. Platforms like WordPress and Shopify update theirs automatically. For custom or static sites, generate a new sitemap whenever you add, remove or rename pages, and upload it in place of the old one.

Frequently asked questions

Quick answers to the questions we hear most. Still have a question? Ask us through our contact page.

How do I create a sitemap for my website for free?

Enter your homepage address in a free XML sitemap generator, download the sitemap.xml file and upload it to your website’s root folder.

Does WordPress create a sitemap automatically?

Yes. WordPress 5.5 and newer publish a sitemap at /wp-sitemap.xml. SEO plugins like Yoast and Rank Math replace it with /sitemap_index.xml.

Can I create a sitemap without a plugin?

Yes. Use an online sitemap generator, or write the XML file by hand for a very small site, then upload it to your root folder.

How often should I update my sitemap?

Whenever you add, remove or rename pages. Most CMSs do this automatically; for custom sites, regenerate and re-upload the file.

Crawly

Crawly is the friendly sitemap guide of XML Sitemap Generator. Every guide is written and checked by the team behind our free sitemap tools.

Related articles

Sitemap Guides

What Is an XML Sitemap? Format, Tags & Examples

22 Nov 2026 · 7 min read
Sitemap Guides

How to Submit Your Sitemap to Google Search Console

23 Nov 2026 · 6 min read
Sitemap Guides

How to Create a Sitemap in WordPress (With or Without a Plugin)

23 Nov 2026 · 4 min read