Guide

How to Submit an XML Sitemap to Search Console

How to put an XML sitemap on the host, add the robots.txt line, and submit that public URL in Google Search Console and Bing Webmaster Tools.

By Abid Ali, maintainer of OG Scope

Published

A bright desk with a laptop listing sitemap.xml beside a notebook line that starts with Sitemap.

To submit sitemap to Google Search Console, the file has to be on a public URL first. Search Console and Bing Webmaster Tools both take that URL. Google's sitemap documentation also says a submission is only a hint: it does not guarantee that Googlebot downloads the file or crawls the URLs inside it.

The sitemap generator can build the file from a crawl, and its page has a short note on where to put it. This guide is the submission itself: the file on the host, the robots.txt line, Search Console, and Bing. Failures after a submit, including "could not be read" and "couldn't fetch," stay on the sitemap errors guide.

Put the XML sitemap on the host

An XML sitemap is a UTF-8 file whose root is urlset or sitemapindex. Each loc is an absolute URL. Google says a sitemap hosted in a folder covers only that folder and the paths under it, unless you submit it in Search Console. A file at the site root can cover the whole host, which is where Google recommends placing it.

A CMS may already publish one, often at /sitemap.xml or /wp-sitemap.xml. Use that address if the file is the list you want crawled. To make a file from the pages a crawler can reach, run the generator, download sitemap.xml, and upload that file. The crawl stays in the browser tab. Nothing is stored on the server, so a closed tab means running the crawl again before there is a file to upload. Put the file at the root. A single file is limited to 50,000 URLs and 50 MB uncompressed. A larger site needs several files and a sitemap index. The errors guide covers that split. This page assumes the file you are submitting is already a valid list.

Open the address in a browser before you submit it. The response should be the XML, with status 200, not an HTML page, a login form, or a redirect to another kind of file. The sitemap validator checks the live URL against the protocol, including a gzip file and a sitemap index.

Add the robots.txt sitemap line

Google finds a sitemap from robots.txt the next time it crawls that file. Add a line anywhere in robots.txt at the root of the same host:

Sitemap: https://www.example.com/sitemap.xml

The value is the full https URL of the file, not a root-relative path. Google shows more than one Sitemap line in robots.txt and does not set a limit on how many. Point every line at the URL you will also submit, so a crawler and Search Console are not reading two different files.

Submit it in the Sitemaps report

Google's documented path is the Sitemaps report in Search Console, on a property you have verified. Submit the same absolute URL. The property has to include that host. A file on www.example.com belongs on the www property, or on a domain property for example.com. Search Console expects the sitemap address to fall inside the property you have open. The report is also where Google shows when Googlebot last reached the file and any processing errors.

Submit the sitemap index when the site is split into several files. Google accepts the index, and it also accepts more than one sitemap submitted on its own, which is useful when you want the performance report split by file. You can also submit through the Search Console API. The report is the path for a one-time submit.

Google also documents cross-submission for URLs on other properties you have verified. A file at the root of one host does not cover a second host by itself.

Submit the same URL to Bing

Bing Webmaster Tools takes an XML sitemap, an RSS or Atom feed, or a text file with one URL per line. Bing's sitemaps help says to open the Sitemaps page for the verified site you have selected, then use the Submit sitemaps button at the top right. You can resubmit one sitemap at a time. The same help page shows the robots.txt sitemap line as the other way Bing discovers the file.

The old anonymous ping URL, bing.com/ping?sitemap=, is not a current method. Bing removed it in May 2022 and pointed people to robots.txt and to Webmaster Tools. After a submit, the Sitemaps section shows a success or error status and a last-read date. Bing says it tries to fetch a submitted sitemap immediately, then again on a regular schedule, typically at least once a day. That schedule is in its July 2025 sitemap post.

Read the result, then stop

Fetch the public URL once more after both submits. The validator should still parse it, and robots.txt should contain the same address. In Search Console, a processing error means the file that was fetched is not a usable sitemap. Use the errors guide for a file that could not be read, a file that could not be fetched, and a redirect in front of the XML. Fix that URL. Submitting a second copy at a different path leaves the broken address in the report.

A successful status means the file was accepted as a hint. It does not mean every loc is indexed. Pages that should not be indexed do not belong in the file you just submitted. Leave that file at the URL you submitted. Moving it, and submitting the new path without removing the old one, leaves two addresses in the reports. Keep the same filename in robots.txt, Search Console, and Bing so a later fetch is not reading an older copy.

Check the live URL

Paste the page into the Open Graph checker to see the tags the server sends.

Open the Open Graph checker

Frequently asked questions

Does a submission make Google index every URL?
No. Google's documentation says a submission is a hint. It does not guarantee that Googlebot will download the file or use it to crawl the site.
Can one robots.txt name more than one sitemap?
Yes. Google's documentation shows more than one Sitemap line and does not set a limit on how many that file can list.
Where should the file live?
Google recommends the site root. Unless you submit the sitemap in Search Console, a file only covers URLs in its own directory and below.
What if Search Console cannot read the file?
That is a different problem from the submission steps. The sitemap errors guide covers a file that could not be read and a file that could not be fetched.

Related guides

Tools for this fix