TECHNICAL SEO

How to Submit an XML Sitemap to Google Search Console

Updated September 7, 2026 · 12 min read

A sitemap is a map of the URLs you want search engines to know about. It does not rank pages by itself. It does not override a noindex tag. It simply tells crawlers where the important addresses live. When Google Search Console refuses the file, the problem is almost never “Google is ignoring the site.” The file is usually invalid, served as HTML, blocked, or submitted at the wrong URL.

This guide is for a small HTML, WordPress or static site that needs Google to accept sitemap.xml. It covers file rules, hosting mistakes, robots.txt, Search Console steps and a checklist you can reuse after every content update. Use the XML Sitemap Generator to build a valid file, then host it at the site root.

What a sitemap must contain

The standard URL set starts with an XML declaration and a urlset namespace. Each url block needs a loc that is an absolute HTTP or HTTPS address. Optional fields such as lastmod, changefreq and priority are allowed. Google uses lastmod when it is accurate and largely ignores fake daily frequencies and made-up priority scores.

Every loc must be a real public URL. Relative paths, missing protocols, spaces, unescaped ampersands and localhost addresses cause rejections. If a page uses query strings that create duplicates, keep only the canonical version. If the site uses clean URLs, list those URLs rather than the internal .html filenames.

Keep the file under 50,000 URLs and 50 MB uncompressed. A small tools or business site should stay far below that. One sitemap at the root is enough until the site grows into multiple languages or large archives.

Host the file where crawlers expect it

Place sitemap.xml in the document root so it is available at https://yourdomain.com/sitemap.xml. Search Console can fetch nested sitemaps, but a root file is easier to remember, easier to list in robots.txt and less likely to be rewritten by a CMS or clean-URL rule.

The response must be XML, not a themed HTML page. If you open the sitemap in a browser and see your header, footer and navigation, a rewrite rule has captured the request. Apache clean-URL setups often send unknown paths through a rule that appends .html. The request for /sitemap.xml must be excluded from that rewrite so the real XML file is served.

The HTTP content type should be application/xml or text/xml with UTF-8. A server that labels XML as text/html is a common reason Search Console reports “Sitemap could not be read” or “Sitemap is HTML.” Confirm the header in the browser network panel or with a headers check before you submit.

Point robots.txt at the sitemap

Add a single sitemap line at the end of robots.txt:

Sitemap: https://yourdomain.com/sitemap.xml

Use the full HTTPS URL. Do not add a second copy with www if the site canonical is non-www, or the reverse. The host in robots.txt, the sitemap loc values and the Search Console property should match the preferred domain. Also confirm that robots.txt does not disallow the sitemap path or the folders that contain the listed pages.

Submit the file in Search Console

  1. Open the Search Console property that matches the live domain, including https and the www or non-www choice.
  2. Go to Indexing, then Sitemaps.
  3. Enter only the sitemap path, usually sitemap.xml, or the full URL if the interface asks for it.
  4. Submit and wait for the first fetch. A successful state shows “Success” and a discovered URL count.
  5. If it fails, open the error, fetch the same URL in an incognito window, and fix the file or headers before submitting again.

Do not submit the homepage, /blog, or a pretty URL that is not the XML file. Search Console needs the sitemap document, not a human page that happens to mention URLs.

Fix the errors that block submission

Sitemap is HTML

The URL returned a web page. Check rewrite rules, a missing file in the document root, and whether the host is serving a 404 template. The first bytes of the response should be <?xml, not <!DOCTYPE html.

Couldn’t fetch

The file is blocked, the SSL certificate is broken, the domain does not resolve, or the URL redirects in a loop. Follow the final URL and confirm a 200 status. Avoid a chain from www to non-www and then to a trailing-slash HTML page.

Invalid URL in loc

A line is missing https, contains a space, or includes an unescaped character. Rebuild the file with absolute URLs only. The XML Sitemap Generator now skips invalid lines and escapes special characters.

URL not allowed

The sitemap lists a different host than the Search Console property. A property for https://toolcentre.in cannot accept URLs on a staging domain, a www variant that is not verified, or a different TLD.

What to list and what to leave out

Include the homepage, category hubs, tools, articles and legal pages that should be found. Leave out thank-you pages, internal search results, filtered duplicates, cart URLs, admin paths and old .html aliases that 301 to clean URLs. A sitemap that advertises duplicates makes it harder for Google to choose a canonical.

When you publish a new article, add its clean URL, update lastmod on the blog index if that page changed, and upload the new sitemap. Then request indexing for the new URL if you need faster discovery. The sitemap remains the long-term discovery method.

Keep lastmod honest

Set lastmod to the date the page content last changed in a meaningful way. Changing a footer year or a theme colour does not require a new date on every URL. Inflated daily dates teach crawlers to ignore the field. For a static HTML site, update the date when you edit that file.

After Google accepts the sitemap

Acceptance means the file was readable. Watch Coverage or Pages reports over the following days. URLs may appear as discovered, crawled, indexed or excluded. Exclusions such as “Crawled – currently not indexed” are quality and duplication decisions, not sitemap syntax errors. Improve the page, internal links and uniqueness instead of resubmitting the same file every hour.

Pair the sitemap with crawlable navigation. An orphan URL that exists only in XML is weaker than a URL linked from the blog index, a related article and a category page. The sitemap helps discovery; internal links explain importance.

A short publishing checklist

  • Generate XML with absolute https URLs only.
  • Save as sitemap.xml in the site root.
  • Confirm the response is XML with a 200 status.
  • Add the Sitemap line to robots.txt.
  • Submit sitemap.xml in the matching Search Console property.
  • Update the file when you add or remove important pages.

Frequently asked questions

Why won’t Google Search Console accept my sitemap?

The usual causes are a wrong content type, a rewrite that turns sitemap.xml into an HTML page, invalid loc URLs, a robots.txt block or submitting a URL that is not the sitemap file.

What URL should I submit in Search Console?

Submit the full sitemap file URL, such as https://example.com/sitemap.xml. Do not submit the homepage, a blog index or a URL without the .xml file.

Does a sitemap guarantee indexing?

No. A sitemap helps discovery. Indexing still depends on crawl access, uniqueness, usefulness, canonicals and whether Google chooses the page as the best result.

Should sitemap URLs include .html?

List only the preferred public URL of each page. If the site uses clean URLs, list those versions and keep .html addresses out of the sitemap.

How often should I update sitemap.xml?

Update it whenever you add, remove or permanently change important pages. Small sites can refresh lastmod dates when content is actually updated, not on a fake daily schedule.

A sitemap is a small technical file with a large effect on discovery. Serve valid XML at a stable HTTPS URL, keep the listed addresses canonical, and tell both robots.txt and Search Console where the file lives. Once that path is clean, new articles can be added to the map as a routine step instead of a guessing game.