An XML sitemap is a file, usually at /sitemap.xml, that lists the canonical URLs you want search engines to crawl and what changed on each one. Google, Bing and others read it to discover pages faster; it does not guarantee indexing and is not a ranking factor on its own.
What an XML Sitemap Contains: urlset, url and loc
An XML sitemap is a urlset of url entries. Every entry needs one loc holding the full canonical address, and may carry a lastmod date. The format is a plain-text protocol defined at sitemaps.org, version 0.9, and every major crawler reads it.
| Tag | Required | What it does |
|---|---|---|
urlset | Yes | Wraps the file and declares the sitemap 0.9 namespace |
url | Yes | One block per page |
loc | Yes | Full https URL in canonical form, with no session parameters |
lastmod | No | Date of the last meaningful change, the one signal Google still uses |
changefreq | No | Accepted by the schema, ignored by Google |
priority | No | Accepted by the schema, ignored by Google |
image:image | No | Extension that lists images found on the page |
Two of those tags are dead weight in Google's eyes: changefreq and priority have been ignored since 2023, so a file that keeps them is not wrong, just no more informative. lastmod earns its place only when it tells the truth about the edit.
A Real sitemap.xml Example
A valid file opens with the XML declaration, then one urlset element, then a url block per page. This is an excerpt of the file WebJi publishes at webji.in/sitemap.xml, with two of its entries.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://webji.in/</loc><lastmod>2026-10-26</lastmod><changefreq>weekly</changefreq><priority>1.0</priority></url>
<url><loc>https://webji.in/shared-hosting/</loc><lastmod>2026-10-26</lastmod><changefreq>monthly</changefreq><priority>0.9</priority></url>
</urlset>
Every loc above matches the canonical tag on that page, trailing slash included. A sitemap URL that differs from the canonical URL sends two signals about the same page. Open your own file in a browser: if it renders as XML rather than a 404 page, it is being served correctly.
Which URLs Belong in a Sitemap, and Which Stay Out
List canonical, indexable pages that return HTTP 200: articles, product pages, categories and the landing pages you want in search. Everything else stays out, because a file full of non-canonical URLs wastes crawl budget and muddies the Search Console report.
- Leave out noindex pages, 301 redirects, parameter duplicates and internal search results.
- Leave out tag or date archives holding one or two posts, until they carry real content.
- Leave out carts, checkout steps and anything behind a login.
- Include orphan pages: the sitemap is often the only link a crawler sees.
A noindex tag and a sitemap entry contradict each other. If a page must stay out of the index, keep the noindex tag and delete the entry. The URL shape in loc follows your permalink structure, so settle that before publishing a large file.
How WordPress Generates an XML Sitemap
WordPress has published /wp-sitemap.xml since version 5.5. It splits content into child sitemaps by type, such as posts, pages and categories, and updates them as you publish. No plugin is needed for that basic file.
Yoast SEO and Rank Math replace it with /sitemap_index.xml, add image entries, and drop any page set to noindex. If Search Console still lists old URLs after a change, check which of the two files you submitted; submitting both splits the record.
The Sitemap Line in robots.txt
robots.txt can point crawlers at the file with a single line: Sitemap: https://webji.in/sitemap.xml. The URL must be absolute, the line sits outside any User-agent group, and a site may list several sitemaps, one per line.
That is the exact line WebJi publishes in its own robots.txt. A sitemap does not have to sit at the domain root, so a CMS that writes /wp-sitemap.xml works the same once the line names it.
Sitemap vs robots.txt: Two Different Jobs
robots.txt is a crawl rule: it tells a bot which paths it may fetch. A sitemap is a discovery list: it tells the bot which URLs you would like fetched. One restricts, the other suggests, and neither guarantees indexing.
The common mistake is blocking a path in robots.txt and still listing it in the sitemap. Search Console then reports the URL as blocked by robots.txt, and it cannot be crawled at all. Structured data is the third file in the set: schema markup describes what a page is, not where it lives.
How to Submit a Sitemap in Google Search Console
Open Search Console, choose Indexing then Sitemaps, type the path that follows your domain, and press Submit. On WordPress that path is usually wp-sitemap.xml or sitemap_index.xml.
- Verify the property for the exact host you use, with or without www.
- Paste the path only, not the full URL, into the Add a new sitemap field.
- Submit, then reopen the row after a few minutes; the status should read Success.
- Open the discovered-URL count and compare it with the number of pages you expected.
- Repeat in Bing Webmaster Tools, or import the verified property from Search Console.
Success means Google fetched and parsed the file. It does not mean every URL inside is indexed; that figure sits in the Page indexing report and moves on its own schedule. Sitemap hygiene is part of the technical SEO services we run for client sites.
Sitemap Limits and When You Need a Sitemap Index
One sitemap may hold 50,000 URLs and must stay under 50 MB uncompressed. Past either limit, publish a sitemap index: a small file of sitemap elements pointing at several child sitemaps, which you submit instead of each child.
Large stores split by type, such as products, categories and blog, and gzip each file. Google accepts the compressed file as long as the URL you submit ends in .xml.gz.
Frequently Asked Questions
What is an XML sitemap?
A plain-text XML file that lists the canonical URLs on your site, each with an optional last-modified date. Crawlers read it to discover and re-crawl pages; it is a discovery aid, not a ranking signal.
Where do I find my website's sitemap.xml?
Try yourdomain.com/sitemap.xml first; if that returns a 404, read robots.txt for a Sitemap line. WordPress sites answer at /wp-sitemap.xml, and Yoast or Rank Math at /sitemap_index.xml.
How do I submit a sitemap to Google?
In Search Console open Indexing, then Sitemaps, enter the path after your domain and submit. The row turns to Success once Google has fetched the file, usually within minutes on a small site.
Does a sitemap improve rankings?
No. Google uses it to find and re-crawl URLs, while ranking still depends on the page itself. It helps a new or large site get discovered sooner, which can look like a ranking gain.
What is the difference between sitemap.xml and robots.txt?
robots.txt controls what crawlers may fetch; sitemap.xml lists what you want fetched. They complement each other, and blocking a URL in robots.txt while listing it in the sitemap is a contradiction.
How often should my sitemap update?
Whenever a page is published, changed or removed, and WordPress plus the main SEO plugins do that automatically. Submit once and let the CMS keep the file current instead of uploading copies by hand.
Is WebJi® an Indian company?
Yes. WebJi® is headquartered in Jaipur, Rajasthan and has operated since 2005. Billing, support and governance all run from India.
Do you provide GST invoices?
Every purchase and renewal gets a GST invoice with our GSTIN, and hosting prices are quoted exclusive of 18% GST. Claim input credit as applicable.

