Skip to content

XML Sitemap

Last Updated: November 25, 2019

What It Is

An XML Sitemap lets you share data about the pages on your website with search engines. By doing so, search engines gain a deeper understanding of which pages exist on your website that they could possibly include in the search results. XML sitemaps become increasingly important for larger websites where it is more likely search engines will be unable to crawl to every page on your website without a comprehensive list of all pages—that comprehensive list is the XML sitemap.

There are also specific XML sitemap formats for news, images, and videos. These can be especially helpful if your website relies heavily on that type of content. For example, if you regularly share videos on your website, having a video XML sitemap can make it easier for search engines to index those videos.

Reading an XML Sitemap

Here is an example entry from an XML sitemap. You’ll see several statements that look something like this within your website’s XML sitemap.


Everything in between the <url> and </url> tags is the information about one particular page on the website. The only required element is the URL to the page. To specify that, you state the link to the page inside the <loc> and </loc> tags. Those <loc> tags are nested inside the <url> tags. In this case, the URL indicates the home page of

All the other data within the same <url> tags relate to that page. In this example, we have the optional fields indicating the date the page was last modified (inside <lastmod>), a rough guide to how frequently the page changes (inside <changefreq>), and what priority you give this page (inside <priority>. While Bing’s developer notes seem to suggest they use these fields, it is worth noting that per Google’s developer specifications:

“Google ignores <priority> and <changefreq> values, so don’t bother adding them.”

If you want to list images or videos contained on this page in the XML sitemap, you can do so within the <url> tags. For example, here is the XML sitemap entry for Elementive’s about page listing the URLs for Andrea’s and my headshot images that are on this page:

    <image:title>Matthew Edgar</image:title>
   <image:title>Andrea Streff</image:title>

Selecting URLs For the XML Sitemap

When building your XML sitemap, the biggest mistake made is including pages you don’t want Google to find or pages Google simply shouldn’t find. For example, XML sitemaps that include broken URLs, URLs containing low-quality content, duplicate content, or URLs that are blocked (either in the robots.txt file or via a meta tag) will return errors and won’t do much to help your SEO performance. You want to regularly prune your XML sitemap file to check for and remove these pages.

Creating an XML Sitemap

Creating an XML sitemap is relatively straightforward and the protocol is fairly simple if you need to create an XML sitemap manually. There are also XML generation tools that can automatically create your sitemap. As well, many plugins exist that allow you to create XML sitemaps dynamically, including the Yoast SEO plugin for WordPress.

Submit XML Sitemap In Google Search Console

After creating the XML sitemap, you want to tell Google and Bing about your new sitemap. The easiest way is to submit your XML sitemap directly to Google and Bing via Google Search Console and Bing Webmaster Tools.

In the Google Search Console sidebar menu, go to the “Index” section and then click on “Sitemaps”.

Click on Sitemaps in Google Search Console

On the Sitemaps page, you will see a form to Add a new sitemap. Enter the URL to your XML sitemap, then click “Submit.” Following this, Google will begin reviewing your XML sitemap.

add xml sitemap in google search console

You can check back to this same page later to see if Google has detected any errors with your XML sitemap. On the main list of XML sitemaps submitted, you’ll see when the sitemap was submitted, when Google last read the sitemap, if Google was successful in reading the XML sitemap and how many URLs were discovered on the sitemap file.

list of xml sitemaps in google search console

You can click on any of these XML sitemaps to view more details, including any details about errors that exist within this XML sitemap file.

view sitemap details

From the details page, you can also click to “See Index Coverage”. This will show you the coverage report specifically for URLs contained in this XML sitemap file. On the coverage report, you can see any URLs listed on this XML sitemap with an error or a warning. This coverage report will also show you any URLs listed on the XML sitemap file that have been excluded for other reasons, such as duplicate content. If your XML sitemap for error URLs, low-quality pages, duplicate pages, or similar issues and remove those from the XML sitemap (and potentially, consider removing those pages from your website too).

As well, you can see how many pages Google discovered on the XML sitemap are valid pages, which indicates the page is eligible to appear in organic search results. If there are a lot of pages on your XML sitemap that is Google isn’t considering a valid page. Those pages will not be included in Google’s index and this is an indication you might have submitted pages in the XML sitemap you shouldn’t have.

xml sitemap coverage report

Submitting the XML Sitemap In Bing Webmaster Tools

In Bing Webmaster Tools, navigate to Configure My Site, then click on Sitemaps.

bing webmaster tools how to submit xml sitemap

After arriving here, enter in your XML sitemap URL, then click submit. Bing will then crawl through your XML sitemap. You can check back to this same page later to see if Bing has detected any errors with your XML sitemap.

bing webmaster tools submit sitemap

List XML Sitemap on Robots.txt

Another way is to list the XML sitemap on your robots.txt file. This is especially helpful when your XML sitemap is not available at the standard “” URL or when you are unable to submit the sitemap to Google Search Console or Bing Webmaster Tools. For example, here is the XML sitemap directive on our robots.txt file:



Technical SEO Services

Want help with your website’s XML sitemap or improving your website’s other technical SEO factors? Contact me today.

Prefer a more DIY approach? Order my book, Tech SEO Guide, a reference guide to help you address the technical SEO  issues on your website. Order now on Amazon.

You may also like

Subdirectory or Subdomain?

Should you use a subdirectory (subfolder) or subdomain for SEO and for the best user experience?

How To Fix 404 Errors On Your Website

How do you find the 404 errors on your website? Once found, how do you fix the 404 errors? What tools can help? Find out in this in-depth 404 guide!

What Are HTTP Headers

Learn what HTTP Headers are, how to view HTTP Headers for your website, and which HTTP Headers can affect your website’s SEO performance.