Fix guide

How to create and submit an XML sitemap

About 3 min read Time to do it: 15 min Updated
Quick answerGenerate a sitemap of canonical, indexable URLs, publish it at your domain root, reference it in robots.txt and submit it in Google Search Console.
On this page
  1. Is this your problem?
  2. Why this matters for SEO
  3. Common causes
  4. Step-by-step fix
  5. How to confirm it worked
  6. Mistakes to avoid
  7. Tools to use
  8. FAQ
  9. Related guides

Why this matters for SEO

Generate a sitemap of canonical, indexable URLs, publish it at your domain root, reference it in robots.txt and submit it in Google Search Console.

Search visibility depends on several systems agreeing: the page must be reachable, discoverable, technically eligible to be indexed, useful for the query, and supported by a clear internal site structure. Fixing one symptom while another system is blocking the page can produce little or no improvement.

Use this guide as a focused workflow rather than a checklist to complete blindly. Confirm the actual page and response first, make the smallest defensible change, then re-test the same evidence after deployment.

Is this your problem?

  • Google does not discover your newer pages.
  • Search Console reports that the sitemap could not be read.

Common causes

  • No sitemap exists, or it lists redirected, noindexed or error URLs.
  • The sitemap is not published at a reachable URL.
Diagnosis order

Check access and HTTP status first, then robots and indexability directives, canonicalization, content/template quality, internal links and performance. This order prevents a low-priority content edit from hiding a technical blocker.

Step-by-step fix

  1. Generate the file

    Enter your public URL in the XML Sitemap Generator, set a page limit and exclude patterns for private or duplicate sections, then download sitemap.xml.

  2. Review the URLs

    Open the XML and remove URLs that redirect, return errors, are noindexed or point to a different canonical.

  3. Publish it

    Upload sitemap.xml to your site root so it loads at https://yourdomain/sitemap.xml.

  4. Reference it

    Add a line Sitemap: https://yourdomain/sitemap.xml to robots.txt.

  5. Validate

    Run the XML Sitemap Validator to catch malformed XML and duplicates.

  6. Submit

    In Search Console open Sitemaps, enter the sitemap URL and submit it.

How to confirm it worked

The sitemap loads with status 200, validates cleanly, and Search Console shows it as successfully read.

Verification should use the same URL and comparable conditions as the original test. Check the HTTP response, rendered/source markup and the relevant Google Search Console report where applicable. A successful technical change does not guarantee immediate indexing; crawling and indexing can take time and Google may still choose not to index a page it considers redundant or low quality.

Mistakes to avoid

  • Listing URLs that redirect or are noindexed.
  • Exceeding 50,000 URLs or 50 MB uncompressed in one file instead of using a sitemap index.

Tools to use

XML Sitemap Generator
XML Sitemap Validator
Sitemap vs Crawl Reconciliation

FAQ

Does a sitemap make Google index my pages?

No. It helps discovery. Indexing depends on quality and technical signals.

How often should I regenerate it?

Whenever pages are added or removed. Many CMSs can regenerate it automatically.

Check your own site now. The free SeOMeter tools run these checks on your own URLs, no sign-up needed.

Open the SEO tools

Was something unclear or out of date? Tell us and we will improve this guide. SEO checks are diagnostic guidance, not a promise of rankings, traffic or indexing.