SEO & Marketing

XML Sitemap: What It Is and How to Create One

By the Domain India teamPublished 8 min read
Knowledge base article
Contents (8 sections)

An XML sitemap is a file that lists the pages on your website you want search engines to find. It does not make Google rank you higher, but it helps new and updated pages get discovered and crawled sooner, especially on a new site or one with few links pointing to it. This guide explains what belongs in a sitemap, how to create one for WordPress, a hand-built site or an AI Website Builder site, and how to submit and check it.

Key takeaways

A sitemap is an XML file, usually at /sitemap.xml or /sitemap_index.xml, listing the canonical URLs of your site. WordPress creates one automatically at /wp-sitemap.xml, and SEO plugins such as Yoast or Rank Math replace it with their own. Add a Sitemap: line to robots.txt, submit the sitemap in Google Search Console and Bing Webmaster Tools, and keep lastmod accurate. Google ignores changefreq and priority.

1. What a sitemap does, and what it doesn't

Search engines find pages mainly by following links. A sitemap gives them a direct list, with the date each page last changed, so they don't have to rely on links alone.

A sitemap helps with
  • Getting new pages discovered quickly
  • Pages that few other pages link to
  • Large sites, where crawlers might miss deep pages
  • Telling search engines when a page really changed, through lastmod
A sitemap does not
  • Guarantee that a page is indexed
  • Improve rankings by itself
  • Hide or remove pages from search results
  • Fix pages that are blocked, broken or duplicated

A small site with good internal links can be crawled without one, but a sitemap costs nothing and gives you useful reports in Search Console, so every site should have one.

2. What goes in a sitemap

Include only pages you want to appear in search results:

  • Canonical URLs only. One version of each page: the https:// address, with or without www, whichever your site actually uses.
  • Pages that return 200. No redirects, no 404s, no pages marked noindex.
  • Absolute URLs. https://www.example.in/about, not /about.

Leave out login pages, cart and checkout pages, internal search results, tag archives you don't want indexed, and any test or staging copy of the site.

3. WordPress: the easy route

WordPress (since version 5.5) creates a basic sitemap automatically at https://yourdomain.in/wp-sitemap.xml. You don't need to do anything to switch it on, as long as Settings → Reading → Search engine visibility is not ticked.

Most sites use an SEO plugin, which replaces the built-in sitemap with a more flexible one:

PluginSitemap addressWhere to control it
Yoast SEO/sitemap_index.xmlYoast SEO → Settings → Site features → XML sitemaps
Rank Math/sitemap_index.xmlRank Math → Sitemap Settings
Built-in (no plugin)/wp-sitemap.xmlNo settings; a plugin or code is needed to change it

Plugin menu names change between versions; if you can't find the option, search the plugin's settings for "sitemap". Use one SEO plugin only: two plugins each producing a sitemap confuse both you and the crawlers.

If you are new to WordPress, our WordPress guide covers installing and managing plugins.

4. A hand-built or static site

For a site without a CMS, create a file called sitemap.xml in the site's root folder (public_html on shared hosting), next to your home page:

xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.in/</loc>
    <lastmod>2026-09-01</lastmod>
  </url>
  <url>
    <loc>https://www.example.in/services</loc>
    <lastmod>2026-08-20</lastmod>
  </url>
</urlset>

Rules for the file:

  • Save it as UTF-8, and escape special characters in URLs: & becomes &amp;.
  • Use the YYYY-MM-DD date format for lastmod, and change it only when the page's content really changes.
  • Leave out changefreq and priority. Google ignores both, so they add nothing.

You can upload the file with the File Manager or FTP. For a site with many pages, a crawler such as Screaming Frog SEO Spider can generate the file for you; check the result before you upload it, because a crawler lists every page it finds, including ones you may want to leave out.

5. Big sites: sitemap index files

One sitemap file can hold at most 50,000 URLs and 50 MB uncompressed. Larger sites split their URLs across several files and list them in a sitemap index:

xml
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.in/sitemap-pages.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://www.example.in/sitemap-products.xml</loc>
  </sitemap>
</sitemapindex>

You then submit only the index. This is what Yoast and Rank Math do at /sitemap_index.xml.

Google also supports extensions for images, videos and news articles, and hreflang entries for sites in several languages. Most small business sites don't need them; an SEO plugin adds images to its sitemaps automatically.

6. Tell search engines where it is

robots.txt. Add a line with the full address of your sitemap to the robots.txt file in your site's root folder. Search engines read this file first, so every crawler learns where the sitemap is:

text
Sitemap: https://www.example.in/sitemap.xml

Google Search Console.

  1. Add and verify your site.
    Go to Google Search Console and add a property. A Domain property is verified with a TXT record, which you add wherever your domain's DNS is managed; see how to change your domain DNS settings.
  2. Open Sitemaps.
    In the left-hand menu, choose Sitemaps.
  3. Submit.
    Enter the sitemap address, for example sitemap.xml or sitemap_index.xml, and click Submit.
  4. Check the status.
    It should say Success within a few days, with the number of URLs discovered.

Bing Webmaster Tools. Add your site (you can import it from Search Console), open Sitemaps and submit the same address. Bing's results also power several other search engines.

Google no longer accepts sitemap "ping" URLs, so old guides that tell you to ping Google after every change are out of date. Keep lastmod accurate and Google will re-read the sitemap on its own.

7. Checking and fixing problems

In Search Console, the Sitemaps report shows whether Google could read the file, and the Pages report shows which pages are indexed and why others aren't.

Status or symptomLikely causeFix
Couldn't fetchWrong address, file missing, or blocked by robots.txtOpen the sitemap address in a browser; check robots.txt does not block it
Has errorsInvalid XML, relative URLs or a wrong date formatFix the file; use absolute URLs and YYYY-MM-DD dates
URLs discovered but not indexedThin or duplicate pages, or Google has not got to them yetImprove the content; give it time
Page with redirect / not foundThe sitemap lists old URLsRemove them, or regenerate the sitemap
Seeing an old copy of your sitemap?

On our cPanel servers, ordinary web responses can be cached for up to two hours. If you have just changed sitemap.xml and your browser still shows the old version, add ?t=1 to the address to see the current file. Search engines will pick up the change on their next visit.

8. Sitemaps on Domain India

  • Shared hosting (cPanel, DirectAdmin, Webuzo): a static sitemap.xml and robots.txt go in your site's root folder. WordPress can be installed with Softaculous, and the sitemap works as described in section 3.
  • AI Website Builder: the sitemap and robots.txt are generated for you. After you publish, the editor's SEO & Analytics panel shows your sitemap URL with a Copy button for Search Console. See configure SEO for your website builder site.

For the rest of on-page SEO, including titles, canonical tags and Core Web Vitals, read our complete SEO guide.

cPanel Starter
₹125/mo + GST
  • 25 GB NVMe SSD Storage
  • 50 GB Monthly Bandwidth
  • 1 Website
  • 10 Email Accounts
See plan details

Prices on the cards exclude 18% GST.

Where is my WordPress sitemap?

WordPress creates one at /wp-sitemap.xml. If you use Yoast SEO or Rank Math, the plugin replaces it with its own, usually at /sitemap_index.xml. Submit whichever one your site uses in Google Search Console.

Does a sitemap improve my Google ranking?

No. A sitemap helps search engines find and crawl your pages, but it does not raise rankings by itself or guarantee that a page is indexed. Content quality and links decide rankings.

How many URLs can one sitemap contain?

Up to 50,000 URLs and 50 MB uncompressed per file. Larger sites split their URLs across several sitemaps and submit a sitemap index that lists them.

Should I use changefreq and priority in my sitemap?

There is no need. Google ignores both fields. Keep lastmod accurate instead, and change it only when a page's content really changes.

How do I submit a sitemap to Google?

Verify your site in Google Search Console, open Sitemaps, enter the sitemap address such as sitemap.xml, and click Submit. Also add a Sitemap line with the full address to your robots.txt file.

Do I need to resubmit my sitemap every time I add a page?

No. Once submitted, search engines re-read it regularly. Keep the file up to date, with accurate lastmod dates, and new pages will be found.

Does the Domain India AI Website Builder create a sitemap?

Yes. It generates a sitemap and robots.txt for your site automatically, and after you publish, the editor's SEO & Analytics panel shows the sitemap URL to copy into Google Search Console.

Ready to get your pages found? Read the complete SEO guide, compare cPanel hosting plans, or try the AI Website Builder, which creates the sitemap for you.

A website that search engines can find

Build your site with AI and get a sitemap, robots.txt and SEO settings generated for you, ready to submit to Google.

Try the AI Website Builder

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
XML Sitemap Guide: Create and Submit One | Domain India