A sitemap is not a ranking trick. It's a list of your pages that shows Google where your content lives. Here's how to create an XML sitemap quickly: run your site through a free crawler, download the sitemap.xml file, upload it to your site's main folder, and submit it in Google Search Console.
The easiest place to start is our free XML Sitemap Generator. It crawls your site the way a search bot does and gives you a clean file with only the pages that should be indexed. No sign-up, no watermark.
Below are the exact steps, a table of what to include, the right line for robots.txt, and fixes for the "Couldn't fetch" status.
What is an XML sitemap, and does your site need one?
An XML sitemap is a file that lists the pages of your website so search engines can find and crawl them. Most sites benefit from one. A small site with good internal links may get found without it.
The plain-words version
Crawling means a bot visits your pages by following links. Google's bot is called Googlebot. A sitemap hands that bot a direct list of addresses, so it doesn't have to discover every page through links alone.
The file follows a shared rulebook called the Sitemaps protocol, so Google and other search engines can read the same format. It's usually named sitemap.xml and opens at yourdomain.com/sitemap.xml.
Do small sites need one?
Honestly, a five-page site for a local dog groomer will probably get found anyway if every page sits in the menu. A sitemap still pays off when the site is brand new, when some pages aren't linked well, or when the site is growing fast. It's quick to make and free, so we'd set one up for any business site.
What a sitemap can't do is force Google to index a page. Indexing means Google saves a page so it can show it in search results. Google still decides which pages are worth keeping.
Sitemap vs robots.txt vs HTML sitemap
- XML sitemap: a list of pages for search engines. Visitors never see it.
- robots.txt: a small text file that tells bots what they may and may not crawl. It can also point to your sitemap. Our guide on how to create a robots.txt file covers it in detail.
- HTML sitemap: a normal web page full of links, made for people who want to browse your site.
Which pages should go in your sitemap?
List only pages that work, can be indexed, and are the main version of their content. Everything else stays out.
Three terms help here. A canonical URL is the one main address for a page when several addresses show the same content. A noindex tag tells Google not to show a page in search. Server codes tell you whether a page works: 200 means fine, 404 means missing, and 301 means moved for good.
| Page type | In or out? | Why |
|---|---|---|
| Homepage, service pages, product pages | In | These are the pages you want people to find. |
| Blog posts and guides | In | Useful content that should show up in search. |
| Thank-you and confirmation pages | Out | No value to a searcher. |
| Login, account, cart and checkout pages | Out | Private, or empty for a bot. |
| Privacy policy and terms | Usually out | Fine to have, but rarely worth pushing in search. |
| Internal search results and ?filter URLs | Out | They create near-copies of other pages. |
| Redirected (301) URLs | Out | List the final address instead. |
| Broken (404) pages | Out | They send Google to a dead end. |
| Pages marked noindex | Out | You'd be asking Google to index a page you told it to skip. |
Our generator leaves out pages that are blocked by robots.txt, marked noindex, redirected, broken, or pointing to a different canonical URL. Google wouldn't index those anyway, so listing them only adds noise.

What to look for in a free sitemap generator
A good generator crawls your real site, skips pages that shouldn't be indexed, and lets you control the optional tags. These are the features that make a difference.
A real crawler, not a guess
The tool should follow your internal links page by page. That way the sitemap matches what a search bot actually sees. Our tool does this for up to 500 pages per crawl.
It respects robots.txt, noindex and canonicals
A generator that lists every URL it finds will fill your sitemap with login pages and duplicates. For example, a shop could end up with dozens of filtered "sort by price" pages. Pick a tool that filters these out by default.
Honest lastmod dates
The <lastmod> tag holds the date a page last had a real change. Per Google's guide to building and submitting a sitemap, Google uses lastmod only when it's consistently accurate, and it ignores <priority> and <changefreq> completely. So choose a tool that can pull the real date from each page.
A crawl report you can read
A sitemap file alone won't show you what's wrong. A report that flags broken links, redirects and noindex pages helps you fix your site, not just list it.
Clear privacy rules
With our tool, our server fetches your pages the way a search-engine bot would. Nothing is stored, and the sitemap is built in your browser.
How to create an XML sitemap with our free generator
Enter your site, set a few options, start the crawl, then download the file. Four steps.
Step 1: Enter your website and pick Max pages
Open the sitemap generator and type your full address, such as https://www.example.com. Under Max pages, choose 50, 100, 250 or 500. Pick a number a bit higher than the page count you expect.
Step 2: Set your options
- lastmod: choose From page. Don't use Today's date for every page. An "updated today" stamp on every URL isn't accurate, so Google simply ignores it.
- changefreq: leave it out. Google ignores it.
- priority: leave it out for the same reason.
- Exclude URLs containing: add words separated by commas, such as
/cart, /login, /thank-you. - Skip URLs with ?query parameters: tick this to drop filter and tracking URLs.
- Add images: tick this if photos matter to your business, like a portfolio or an online shop. It adds the images found on each page.
Step 3: Click Start crawl and read the report
Click Start crawl. The tool visits your pages and shows the result for each one.
Check the results before you download. A nearly empty sitemap often means the site is still marked noindex. That's common right after a site moves from a test (staging) server to the live domain. If you see many redirects, our guide to 301 vs 302 redirects will help.
Step 4: Copy or download sitemap.xml
Click Download sitemap.xml, or use Copy to paste the code somewhere else. Save the Crawl report .txt too. It works as a to-do list of fixes.
Free sitemap generator vs plugin vs hand-written: which fits?
If your platform already makes a sitemap, use that. If it doesn't, a free generator is the fastest route for sites under 500 pages.
| Option | Best for | Updates itself? | Limits |
|---|---|---|---|
| Built into your platform (Shopify, Wix, Squarespace, Webflow) | Sites built on those platforms | Yes | Less control over what's listed |
| WordPress SEO plugin (Yoast SEO, Rank Math, All in One SEO) | WordPress sites of any size | Yes | Settings need a quick check |
| Free crawler like our generator | Custom-coded, static, Laravel or PHP sites up to 500 pages | No, re-run after changes | 500 pages per crawl |
| Hand-written file | Tiny sites with a few pages | No | Easy to make typos |
Writing a sitemap by hand
A sitemap needs only three tags. <urlset> wraps the whole file, <url> wraps one page, and <loc> holds the page address. Here's a small XML sitemap example:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://www.example.com/</loc><lastmod>2026-10-01</lastmod></url>
<url><loc>https://www.example.com/services/</loc></url>
</urlset>
Save it as sitemap.xml with UTF-8 encoding. UTF-8 is a text format that handles all letters and symbols, and sitemaps must use it.
Special characters need "escaping," which means writing them in a safe form. For example, & becomes &. The order of the URLs doesn't matter to Google.
Upload sitemap.xml to your site's root folder
Put the file in the main (root) folder of your website so it opens at yourdomain.com/sitemap.xml.
On most shared hosting, that folder is public_html. On a Laravel site, it's the public folder. Upload the file with your host's file manager or an FTP app.
Then test it. Open a private browser window and visit https://yourdomain.com/sitemap.xml. You should see your list of URLs, not a 404 page or a login screen.
Using subdomains, like shop.example.com? Each one needs its own sitemap at its own root. Digital.gov's introduction to XML sitemaps gives the same advice.
How do you add a sitemap to robots.txt?
Add one line to your robots.txt file with the full address of your sitemap: Sitemap: https://www.example.com/sitemap.xml.
Always write the full address, including https:// and your domain, so there's no doubt where the file lives. The line can go anywhere in the file.
This line does two jobs. Other search engines can find your sitemap without you submitting it anywhere. And if you can't get owner access in Search Console, it still tells Google where to look. Check the file afterward with our Robots.txt Tester.
How do you submit a sitemap to Google Search Console?
Open Search Console, go to Indexing → Sitemaps, type sitemap.xml in the box, and click Submit.
Google Search Console is Google's free tool that shows how your site performs in search. Before you submit, add and verify your site there using the exact version your site loads on. Search Console treats http, https, www and non-www as separate properties.
"Submitting" only tells Google where your file is. You can't upload the file to Google. According to the Search Console Sitemaps report help, you need owner permission to use the report, and Google tries to crawl the sitemap as soon as you submit it.
What the status means
- Success: Google read the file. That doesn't mean every page will be indexed.
- Has errors: Google read it but found problems, like bad URLs or broken code.
- Couldn't fetch: Google couldn't get the file at all, or hasn't tried yet.
Sitemap "couldn't fetch": causes and fixes
"Couldn't fetch" usually means Google can't reach the file at the address you gave it. Sometimes it's just a delay on Google's side.
Start with the basics. Open the sitemap URL in a private window and confirm it loads without a login. Then check that it matches your Search Console property exactly.
| Symptom | Likely cause | Fix |
|---|---|---|
| URL shows a 404 | File not in the root folder, or wrong file name | Re-upload to public_html or Laravel's public folder |
| Wrong address submitted | A page URL was entered instead of the sitemap | Remove it and submit sitemap.xml |
| Sitemap URL jumps to the homepage | A redirect rule catches it | Exclude sitemap.xml from that rule |
| Login or password page appears | Site still behind staging protection | Remove the password from the live site |
| Bots get blocked | robots.txt rule or firewall | Allow the sitemap URL for bots |
| Loads fine, still fails | http/https/www property mismatch | Submit under the property your site really uses |
| Odd characters in URLs | Spaces or unescaped symbols | Fix the URLs and escape characters like & |
| Server error (5xx) | Host was down or overloaded | Check with your host, then resubmit |
| Just submitted, everything checks out | Google hasn't fetched it yet | Wait |
When to just wait
If the file loads, the path is right and the property matches, give it time. Wix's help page notes that the error often clears within a couple of days or weeks. Resubmitting over and over won't speed it up.
Red flags and common sitemap mistakes
Most sitemap problems come from two things: listing the wrong pages, or giving Google dates it can't trust.
- Fake lastmod dates. Stamping today's date on every page doesn't help. Google just ignores it.
- Listing redirects, noindex or 404 pages. Run our Broken Link Checker before you build the file.
- Mixed address versions. If your canonical URLs use
https://www.with a trailing slash, every sitemap URL should match that exactly. - Localhost or staging URLs. A sitemap must list live addresses only.
- Going over the limit. Under the Sitemaps protocol, one file can hold 50,000 URLs or 50MB uncompressed. Bigger sites split their URLs into several files listed in a sitemap index file, which is a sitemap of sitemaps. The 50MB limit applies to the uncompressed file, so gzip won't get you around it.
- Forgetting to update. New pages that aren't in the sitemap can take longer for Google to find.
Questions to ask if someone else handles your sitemap
If a developer or agency manages your site, these five questions show whether the sitemap is in good shape.
- Where does our sitemap live, and does it update by itself?
- Which pages are left out on purpose, and why?
- Are the lastmod dates real?
- Is the sitemap listed in robots.txt and submitted in Search Console?
- Who checks the Sitemaps report after we add or remove pages?
Vague answers to any of these are a sign the setup needs a closer look.
Our recommendation by situation
Use what your platform gives you first. Reach for a free crawler only where there's a gap.
- WordPress site: turn on the sitemap in your SEO plugin and submit the address it shows.
- Shopify, Wix or Squarespace: use the built-in sitemap and submit it.
- Custom, static or Laravel site under 500 pages: use our generator and re-run it when pages change.
- Site with more than 500 pages: use a plugin or a sitemap built into your CMS or code.
- Site still on your own computer (localhost): wait until it's live. Our crawler runs on our server, so it can't reach a site that only exists on your machine.
Keep your sitemap fresh after launch
Update your sitemap whenever you add or delete pages. A sitemap full of old pages sends Google to dead ends.
On a manual setup, re-run the free XML Sitemap Generator, upload the new file over the old one, and check the Sitemaps report a few days later. Then run the Website SEO Checker on your key pages and tidy your titles with the Meta Tag Generator.
Rather hand it off? On every site we build, SEO and performance are built in from day one, including technical SEO setup. Our post-launch maintenance plans cover updates, backups and new features, and our SEO services team handles the technical fixes.
You get a dedicated project manager, weekly demos and a fixed quote after a free discovery call, with no hidden costs. We work with clients worldwide. Request a Free Quote and we'll reply within one business day.
Frequently Asked Questions
How do I create a sitemap.xml file for my website?
Run your site through a free crawler, download the file, and upload it to your root folder. Our generator does the crawl and builds the file in your browser, with no sign-up.
How do I create an XML sitemap for WordPress?
Use an SEO plugin such as Yoast SEO, Rank Math or All in One SEO. They build and update the sitemap for you. Find the exact sitemap address in the plugin's settings, then submit it in Search Console.
How do I create an XML sitemap manually?
Write a UTF-8 text file with <urlset>, one <url> block per page, and a <loc> tag holding each address. Save it as sitemap.xml and upload it to your root folder. This works well for very small sites.
How do I create a sitemap.xml for my localhost website?
Wait until the site is live on its real domain. A sitemap should only list public addresses, and online crawlers can't reach a site on your own computer.
Is the sitemap generator free, and is my site safe?
Yes, it's free with no sign-up. Our server fetches your pages like a search bot, nothing is stored, and the sitemap is built in your browser.
Does Google use priority and changefreq?
No. Google ignores both. For Google, an accurate lastmod date is the only optional tag worth adding.
How long does Google take to read my sitemap?
Google tries to fetch it as soon as you submit it. Indexing the pages can take much longer, and some pages may never be indexed. If you see "Couldn't fetch" and everything checks out, give it a few days before you change anything.