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.

Contents
- Before you start: does your site already have a sitemap?
- How to create a sitemap on popular platforms
- Method 1: Create a sitemap with a free generator
- Method 2: Create a sitemap from a list of URLs
- Method 3: Write the sitemap by hand
- Step 4: Upload the sitemap to your website
- Step 5: Check the sitemap for errors
- Step 6: Tell search engines about it
- 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.
How to create a sitemap on popular platforms
| Platform | Sitemap address | What you need to do |
|---|---|---|
| WordPress (built-in) | /wp-sitemap.xml | Nothing — WordPress 5.5 and newer create it automatically. |
| WordPress + Yoast SEO | /sitemap_index.xml | Turn on XML sitemaps in Yoast’s settings (on by default). |
| WordPress + Rank Math | /sitemap_index.xml | Enable the Sitemap module. |
| Shopify | /sitemap.xml | Nothing — created and updated automatically. |
| Wix | /sitemap.xml | Nothing — generated automatically once your site is published. |
| Squarespace | /sitemap.xml | Nothing — generated automatically. |
| Blogger | /sitemap.xml | Nothing — 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:
- Enter your homepage address, for example
https://example.com. Use the exact version visitors see —https, and with or withoutwww. - 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.
- Click Generate Sitemap. Pages appear in real time as they are found. Redirects, error pages and
noindexpages are left out automatically. - 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 &, 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
- Open your hosting file manager or FTP client (cPanel, Plesk, FileZilla and similar).
- Upload
sitemap.xmlto your root folder — usuallypublic_htmlorwww— so it opens athttps://yourdomain.com/sitemap.xml. If you split your sitemap, upload every.xmlfile. - 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.


