What is a Sitemap and Why Your Website Needs It
Understand how sitemap helps search engines discover important pages.
What a sitemap is
An XML sitemap is a file (usually /sitemap.xml) that lists the important URLs of your website, with optional last-modified dates. It helps Google and Bing discover new and updated pages faster – especially on new sites, large sites, or pages that have few internal links.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-10-20</lastmod>
</url>
<url>
<loc>https://example.com/courses/python/</loc>
<lastmod>2026-10-24</lastmod>
</url>
</urlset>
What to include (and leave out)
| Include | Leave out |
|---|---|
| Canonical URLs you want in search (one version: https, with or without www) | Redirects (301), 404 pages, duplicate URLs with ?utm= parameters |
| Pages that return 200 OK | Pages blocked by robots.txt or marked noindex |
| Important articles, products, categories | Login, cart, search-result and admin pages |
Real lastmod dates (when content truly changed) | Today’s date on every page every day |
Limits: 50,000 URLs or 50 MB (uncompressed) per sitemap file. Larger sites use a sitemap index that lists several sitemap files.
How to create one
- WordPress: built-in at
/wp-sitemap.xml; SEO plugins (Yoast, Rank Math) create/sitemap_index.xml. - Blogger: automatic at
/sitemap.xml. - Custom PHP site: generate it from your database or content list so new pages are added automatically – write it with
header("Content-Type: application/xml"). - Small static site: write the file by hand or use a crawler tool, then update it when pages change.
Submit it to Google and Bing
- Add this line to
robots.txt:Sitemap: https://yourdomain.com/sitemap.xml(see robots.txt basics). - Google Search Console → your property → Sitemaps → enter
sitemap.xml→ Submit. - Bing Webmaster Tools → Sitemaps → Submit sitemap.
- Check the status after a few days: “Success” and the number of discovered URLs.
Common Search Console messages
| Message | Meaning / fix |
|---|---|
| Couldn’t fetch | Wrong URL, the file returns 404/500, or it is blocked – open it in a browser |
| Sitemap is HTML | The URL returns a web page instead of XML – check the address and Content-Type |
| Discovered – currently not indexed | Google knows the page but has not indexed it yet; improve quality and internal links |
| Duplicate without user-selected canonical | Several URLs show the same content – keep one and use canonical/redirects |
Sitemap क्या है
XML sitemap एक file (आम तौर पर /sitemap.xml) है जो आपकी website के ज़रूरी URLs, वैकल्पिक last-modified dates के साथ, list करती है। यह Google और Bing को नए और updated pages जल्दी ढूँढने में मदद करती है – ख़ासकर नई sites, बड़ी sites, या कम internal links वाले pages के लिए।
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-10-20</lastmod>
</url>
<url>
<loc>https://example.com/courses/python/</loc>
<lastmod>2026-10-24</lastmod>
</url>
</urlset>
क्या शामिल करें (और क्या नहीं)
| शामिल करें | छोड़ दें |
|---|---|
| Search में चाहिए वाले canonical URLs (एक version: https, www के साथ या बिना) | Redirects (301), 404 pages, ?utm= parameters वाले duplicate URLs |
| 200 OK देने वाले pages | robots.txt से blocked या noindex वाले pages |
| ज़रूरी articles, products, categories | Login, cart, search-result और admin pages |
असली lastmod dates (जब content सच में बदला) | हर page पर रोज़ आज की date |
सीमाएँ: हर sitemap file में 50,000 URLs या 50 MB (uncompressed)। बड़ी sites कई sitemap files list करने वाला sitemap index इस्तेमाल करती हैं।
कैसे बनाएँ
- WordPress: built-in
/wp-sitemap.xml; SEO plugins (Yoast, Rank Math)/sitemap_index.xmlबनाते हैं। - Blogger: अपने-आप
/sitemap.xmlपर। - Custom PHP site: database या content list से generate करें ताकि नए pages अपने-आप जुड़ें –
header("Content-Type: application/xml")के साथ लिखें। - छोटी static site: file हाथ से लिखें या crawler tool इस्तेमाल करें, फिर pages बदलने पर update करें।
Google और Bing को submit करें
robots.txtमें यह line जोड़ें:Sitemap: https://yourdomain.com/sitemap.xml(robots.txt basics देखें)।- Google Search Console → आपकी property → Sitemaps →
sitemap.xmlलिखें → Submit। - Bing Webmaster Tools → Sitemaps → Submit sitemap।
- कुछ दिन बाद status देखें: “Success” और खोजे गए URLs की संख्या।
Search Console के आम संदेश
| संदेश | मतलब / सुधार |
|---|---|
| Couldn’t fetch | ग़लत URL, file 404/500 देती है, या blocked है – browser में खोलकर देखें |
| Sitemap is HTML | URL XML की जगह web page देता है – address और Content-Type जाँचें |
| Discovered – currently not indexed | Google page जानता है पर अभी index नहीं किया; quality और internal links सुधारें |
| Duplicate without user-selected canonical | कई URLs एक जैसा content दिखाते हैं – एक रखें और canonical/redirects लगाएँ |
Frequently Asked Questions
Does a sitemap improve Google ranking?
Not directly. It helps Google find and recrawl your pages; rankings depend on content quality, relevance and many other signals.
Where is my website’s sitemap?
Try yourdomain.com/sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml, or look for the Sitemap line in yourdomain.com/robots.txt.
Should every page be in the sitemap?
Only pages you want in search results that return 200 OK and are the canonical version. Leave out redirects, errors, duplicates and private pages.
