How to Create an XML Sitemap and Submit It to Google

An XML sitemap is a list of the pages you want search engines to find. It does not guarantee rankings, but it helps Google discover new and updated pages faster – especially on new sites, large sites and pages with few internal links. Here is how to create one and submit it.

Free tool
Create a sitemap.xml
Paste your URLs and download a valid XML sitemap with lastmod dates – duplicates and invalid URLs removed automatically. Free.
Open XML Sitemap Generator →

What a sitemap looks like

A sitemap is a simple XML file. Each page is a <url> entry with its address in <loc> and, optionally, the date it last changed in <lastmod>. The file usually lives at https://yourdomain.com/sitemap.xml.

Do I already have one?

PlatformDefault sitemap URL
WordPress (core)/wp-sitemap.xml
WordPress with an SEO pluginusually /sitemap_index.xml or /sitemap.xml
Shopify/sitemap.xml
Wix/sitemap.xml
Squarespace/sitemap.xml

Open the address in your browser. If it loads, you already have a sitemap – just submit it. Static sites, custom-built sites and landing pages often do not, and need one created.

What to include – and what to leave out

Include only canonical, indexable pages you want in search results:

  • Home, service, product and category pages
  • Blog posts and guides
  • Important landing pages

Leave out:

  • Redirects (301/302) and error pages (404)
  • Pages with noindex
  • Duplicate URLs with tracking parameters (?utm_source=…)
  • Login, cart, checkout and account pages
  • Thin tag or archive pages you do not want ranking

A sitemap that lists broken or redirected URLs looks low quality and wastes crawl time.

How to create a sitemap

  • CMS users: turn on the sitemap in your platform or SEO plugin – it updates automatically.
  • Small static sites: list your page URLs and paste them into our Sitemap Generator. It removes duplicates and invalid lines and adds lastmod dates.
  • Large custom sites: generate the sitemap from your database or build process so it stays current.

The limits

A single sitemap can hold 50,000 URLs and 50 MB uncompressed. Bigger sites split URLs into several sitemaps and list them in a sitemap index file.

lastmod, changefreq and priority

  • lastmod – Google uses it if it is consistently accurate. Only update it when the page content really changes.
  • changefreq and priority – Google ignores both. You can leave them out.

How to submit your sitemap

  • Upload sitemap.xml to your site’s root folder (skip if your CMS creates it).
  • Add a line to your robots.txt: Sitemap: https://yourdomain.com/sitemap.xml.
  • In Google Search Console, open Indexing › Sitemaps, enter the sitemap URL and click Submit.
  • In Bing Webmaster Tools, open Sitemaps and submit the same URL.
  • Check back after a few days: Search Console shows how many URLs were discovered and any errors.

Common sitemap errors

  • “Couldn’t fetch” – the URL is wrong, blocked by robots.txt or returns an error.
  • “Has errors” – invalid XML, often unescaped & characters in URLs (they must be written as &amp;).
  • Discovered but not indexed – a sitemap helps discovery, but Google decides what to index based on quality and usefulness.

FAQ

Do I need a sitemap?

Small, well-linked sites can be found without one, but a sitemap is easy to add and helps new pages get discovered faster.

Where should my sitemap be?

Usually at the root: https://yourdomain.com/sitemap.xml. Reference it in robots.txt and submit it in Search Console.

How many URLs can a sitemap contain?

Up to 50,000 URLs or 50 MB uncompressed per file.

Should I include images in my sitemap?

Optional. Image sitemaps can help Google find important images that are hard to discover through normal crawling.

How often should I update my sitemap?

Whenever you add, remove or significantly change pages. CMS sitemaps update automatically.

Free tool
Try the free XML Sitemap Generator
No signup and nothing uploaded – it runs right in your browser. Browse all 74 free tools on our Free Tools page.
Open XML Sitemap Generator →

Need a website or app for your business? Talk to Techpass Master – we design and build websites and apps for clients worldwide.

WhatsApp us📞 Call now