Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
Guide 59 · SEO & Website Basics · Hindi + English

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>
A sitemap helps discovery; it does not guarantee indexing or rankings. Google still decides based on quality, duplicates and usefulness.

What to include (and leave out)

IncludeLeave 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 OKPages blocked by robots.txt or marked noindex
Important articles, products, categoriesLogin, 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

  1. Add this line to robots.txt: Sitemap: https://yourdomain.com/sitemap.xml (see robots.txt basics).
  2. Google Search Console → your property → Sitemaps → enter sitemap.xml → Submit.
  3. Bing Webmaster Tools → Sitemaps → Submit sitemap.
  4. Check the status after a few days: “Success” and the number of discovered URLs.

Common Search Console messages

MessageMeaning / fix
Couldn’t fetchWrong URL, the file returns 404/500, or it is blocked – open it in a browser
Sitemap is HTMLThe URL returns a web page instead of XML – check the address and Content-Type
Discovered – currently not indexedGoogle knows the page but has not indexed it yet; improve quality and internal links
Duplicate without user-selected canonicalSeveral 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>
Sitemap खोज में मदद करता है; यह indexing या ranking की गारंटी नहीं देता। Google फिर भी quality, duplicates और उपयोगिता के आधार पर तय करता है।

क्या शामिल करें (और क्या नहीं)

शामिल करेंछोड़ दें
Search में चाहिए वाले canonical URLs (एक version: https, www के साथ या बिना)Redirects (301), 404 pages, ?utm= parameters वाले duplicate URLs
200 OK देने वाले pagesrobots.txt से blocked या noindex वाले pages
ज़रूरी articles, products, categoriesLogin, 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 करें

  1. robots.txt में यह line जोड़ें: Sitemap: https://yourdomain.com/sitemap.xml (robots.txt basics देखें)।
  2. Google Search Console → आपकी property → Sitemaps → sitemap.xml लिखें → Submit।
  3. Bing Webmaster Tools → Sitemaps → Submit sitemap।
  4. कुछ दिन बाद status देखें: “Success” और खोजे गए URLs की संख्या।

Search Console के आम संदेश

संदेशमतलब / सुधार
Couldn’t fetchग़लत URL, file 404/500 देती है, या blocked है – browser में खोलकर देखें
Sitemap is HTMLURL XML की जगह web page देता है – address और Content-Type जाँचें
Discovered – currently not indexedGoogle 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.

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free