Skip to content

XML Sitemap: What It Is, Best Practices and How to Submit It

What an XML sitemap is, what to include and exclude, an example sitemap, how to create one in WordPress and how to submit it to Google and Bing.
XML Sitemap: What It Is, Best Practices and How to Submit It — WebDesigningPune guide
Quick answer

An XML sitemap is a file that lists the important URLs on your website so search engines can discover and crawl them efficiently. Include only canonical, indexable pages that return a 200 status, keep it updated automatically (WordPress and SEO plugins do this), reference it in robots.txt and submit it in Google Search Console and Bing Webmaster Tools.

An XML sitemap is a simple list of the pages you want search engines to know about. It does not guarantee those pages will be indexed or rank, but it helps search engines discover them — especially on new sites, large sites and pages that are not well linked.

The good news is that most modern platforms create a sitemap for you. Your job is mainly to make sure it contains the right pages and that search engines know where to find it.

Why sitemaps matter

  • Help search engines find new and updated pages faster.
  • Especially useful for new sites, large sites and pages with few internal links.
  • Show search engines which URLs you consider important (canonical).
XML sitemap: why sitemaps matter

A sitemap does not guarantee indexing — quality and internal links still matter.

Example XML sitemap

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/how-to-install-wordpress/</loc>
    <lastmod>2026-11-12</lastmod>
  </url>
</urlset>

Large sites use a sitemap index that links to several sitemaps (for example posts, pages and products). A single sitemap can list up to 50,000 URLs or 50 MB uncompressed.

What to include and exclude

Include Exclude
Important pages and posts Noindexed pages
Canonical URLs only Redirects and 404 pages
Useful category or product pages Thin tag archives, internal search results
Accurate lastmod dates Duplicate or parameter URLs

Create and submit a sitemap

  1. Generate itWordPress creates a basic sitemap at /wp-sitemap.xml; SEO plugins such as Rank Math or Yoast create /sitemap_index.xml with more control.
  2. Check itOpen it in a browser and confirm it lists the right URLs.
  3. Add it to robots.txtAdd a line such as Sitemap: https://example.com/sitemap_index.xml.
  4. Submit to GoogleSearch Console → Indexing → Sitemaps.
  5. Submit to BingBing Webmaster Tools → Sitemaps.
Annotated screenshot for “Create and submit a sitemap” — show the exact screen and circle the button or setting

Tip: Google ignores the <priority> and <changefreq> values, but uses an accurate <lastmod> date. Only update lastmod when content meaningfully changes.

Check your sitemap in five minutes

  1. Find itTry yoursite.com/sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml.
  2. Open a few URLsMake sure they load and are pages you want in search.
  3. Look for unwanted pagesTag archives, thank-you pages, test pages or noindexed URLs.
  4. Check robots.txtAdd a Sitemap: line pointing to your sitemap.
  5. Review Search ConsoleCheck the Sitemaps report for errors and discovered pages.

Common sitemap problems

Problem Fix
Sitemap includes noindexed pages Remove them, or remove the noindex if they should rank
Redirected URLs in sitemap List only final destination URLs
HTTP and HTTPS mixed Use your canonical HTTPS URLs only
Two sitemaps from two plugins Disable one SEO plugin or its sitemap feature
Search Console shows “Couldn’t fetch” Check the URL loads, is not blocked and returns valid XML

Related: robots.txt, Search Console tutorial and technical SEO.

Frequently asked questions

Do I need an XML sitemap?

It is strongly recommended, especially for new, large or poorly linked sites. Small sites with good internal linking can be found without one, but a sitemap helps.

Where is my WordPress sitemap?

WordPress provides /wp-sitemap.xml by default. SEO plugins usually replace it with /sitemap_index.xml.

How often should I update my sitemap?

Let your CMS or plugin update it automatically whenever you publish or change content.

Should I include images in my sitemap?

Image sitemaps can help images get discovered. Many SEO plugins add image entries automatically.

Does a sitemap help a small website?

It still helps search engines discover pages quickly, and it is free and automatic on most platforms, so it is worth having.

Can I have more than one sitemap?

Yes. Large sites often use a sitemap index linking to several sitemaps for posts, pages, products and images.

Should I resubmit my sitemap after every post?

No. Search engines re-check sitemaps regularly. Submit it once and resubmit only after major changes.


Further reading: Google Search Central documentation.

First published November 17, 2026 · Last updated November 26, 2026