sitemap XML

What sebuah sitemap XML adalah, -nya anatomy, ignored tags (priority/changefreq), accurate lastmod, 50 000/50MB limits, hreflang di sitemaps, dan cara submit one.

Pertama kali diterbitkan: 22 Jun 2026 · Terakhir diperbarui: 3 Agu 2026 · Advanced
Bahasa
1 sinyal bukti di halaman ini

sebuah sitemap XML adalah sebuah UTF-8 file listing canonical, dapat diindeks URLs Anda ingin mesin pencari untuk know tentang — setiap di sebuah <url> block dengan sebuah diperlukan <loc> dan sebuah optional <lastmod>. ini helps mesin menemukan URLs tetapi doesn't guarantee pengindeksan; -nya nyata payoff adalah submitted-vs-terindeks diagnostic di Search Console. Google ignores <priority> dan <changefreq>, dan menggunakan <lastmod> hanya when ini adalah verifiably accurate (significant updates, not sebuah blanket 'today'). One sitemap caps di 50 000 URLs atau 50MB uncompressed — past itu Anda split files dan reference them dari sebuah sitemap indeks. sertakan hanya canonical, dapat diindeks, 200-status URLs; leaving sebuah URL out dari sitemap adalah not yang sama sebagai noindexing ini. Sitemaps adalah juga easiest place untuk manage hreflang di scale. Reference ini di robots.txt dan submit ini di Search Console dan Bing Webmaster alat.

TL;DR — sebuah sitemap XML adalah sebuah UTF-8 file dari canonical, dapat diindeks <loc> URLs, setiap optionally carrying sebuah <lastmod>. ini aids penemuan, not pengindeksan — payoff adalah submitted-vs-terindeks signal di Search Console. Google ignores <priority> dan <changefreq> dan menggunakan <lastmod> hanya when ini adalah verifiably accurate (significant updates, tidak pernah sebuah blanket “today” (terjemahan) “today”). One file caps di 50 000 URLs atau 50MB uncompressed — past itu, split dan gunakan sitemap indeks. sertakan hanya 200, canonical, dapat diindeks URLs; excluding sebuah URL adalah not yang sama sebagai noindexing ini. XML isn’t satu-satunya accepted format (RSS/Atom/txt berfungsi too), dan sitemaps adalah easiest place untuk manage hreflang di scale — though itu annotations go live pada sebuah lag, not instantly. Reference ini di robots.txt dan submit ini di Search Console + Bing Webmaster alat.

Evidence for this claim The XML sitemap protocol lists canonical URL locations and optional metadata, with limits of 50,000 URLs and 50 MB uncompressed per sitemap. Scope: Sitemaps protocol and current Google-supported limits. Confidence: high · Verified: Sitemaps XML format Evidence for this claim Google treats sitemaps as discovery hints rather than guarantees and supports submission through Search Console or robots.txt references. Scope: Current Google sitemap behavior and submission methods. Confidence: high · Verified: Google Search Central: Build and submit a sitemap

What sebuah sitemap XML actually adalah

sebuah sitemap XML adalah sebuah file, written untuk sitemaps.org 0.9 protocol, itu lists URLs pada Anda situs Anda ingin mesin untuk know tentang. Google’s own definition: “A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them.” (terjemahan) “sebuah sitemap adalah sebuah file where Anda menyediakan informasi tentang halaman, videos, dan lainnya files pada Anda situs, dan relationships antara them.” ini adalah sebuah penemuan aid dan sebuah coverage diagnostic — explicitly not sebuah guarantee: “A sitemap helps search engines discover URLs on your site, but it doesn’t guarantee that all the items in your sitemap will be crawled and indexed.” (terjemahan) “sebuah sitemap helps search mesin menemukan URLs pada Anda situs, tetapi ini doesn’t guarantee itu semua items di Anda sitemap akan menjadi di-crawl dan terindeks.”

itu framing penting, because ini adalah where sebuah lot dari effort gets misspent. sitemap isn’t sebuah peringkat lever dan ini isn’t sebuah pengindeksan command. Here’s sebuah annotated minimal contoh:

<?xml version="1.0" encoding="UTF-8"?>            <!-- XML declaration; UTF-8 -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">  <!-- root + namespace -->
  <url>                                           <!-- one entry per page -->
    <loc>https://www.example.com/foo.html</loc>   <!-- required: absolute URL -->
    <lastmod>2026-06-04</lastmod>                 <!-- optional: last significant change -->
  </url>
</urlset>

Anatomy

  • ** XML declaration** — <?xml version="1.0" encoding="UTF-8"?>. Google adalah unambiguous here: “The sitemap file must be UTF-8 encoded.” (terjemahan) “ sitemap file harus menjadi UTF-8 encoded.” Get encoding wrong dan special characters break.
  • <urlset> + namespace — root element, dengan xmlns="http://www.sitemaps.org/schemas/sitemap/0.9". namespace adalah what tells parser ini adalah sebuah sitemap; wrong atau missing namespace adalah sebuah umum Search Console error.
  • <url> — one block per halaman.
  • <loc> — diperlukan. “Use fully-qualified, absolute URLs in your sitemaps” (terjemahan) “gunakan fully-qualified, absolute URLs di Anda sitemaps” — not relative paths, dan di bawah ~2 048 characters. semua nilai harus menjadi entity-escaped: & becomes &amp;, ' becomes &apos;, " becomes &quot;, > becomes &gt;, dan sebuah literal less-daripada becomes &lt;.
  • <lastmod> — optional; date halaman last significantly changed (more pada honesty aturan below).
Evidence for this claim Each loc must be a fully qualified absolute URL and XML special characters must be entity escaped. Scope: XML/HTTP sitemap generation, hosting and submission Confidence: high · Verified: Build and submit a sitemap

ignored-tags truth

ini adalah single sebagian besar out-dari-date thing di sebagian besar sitemap tutorials. Two legacy tags — <priority> dan <changefreq> — adalah ignored oleh Google. Gary Illyes called priority “essentially a bag of noise,” (terjemahan) “essentially sebuah bag dari noise,” dan John Mueller memiliki said priority dan perubahan frequency “doesn’t really play that much of a role with Sitemaps anymore.” (terjemahan) “doesn’t really play itu much dari sebuah role dengan Sitemaps anymore.” Bing memiliki confirmed yang sama: changefreq dan priority no longer affect -nya crawling atau peringkat. Anda dapat leave them di (mereka melakukan no harm) atau strip them out — mereka simply don’t melakukan anything.

<lastmod> adalah berbeda — melakukan not lump ini di dengan ignored tags. Google melakukan gunakan <lastmod>, tetapi hanya when ini trusts ini, dan itu trust adalah roughly binary: either Google believes Anda dates atau ini doesn’t. aturan adalah itu date seharusnya reflect sebuah significant perubahan — “an update to the main content, the structured data, or links on the page is generally considered significant, however an update to the copyright date is not.” (terjemahan) “sebuah update untuk main konten, data terstruktur, atau tautan pada halaman adalah umumnya considered significant, however sebuah update untuk copyright date adalah not.” failure mode I see constantly adalah stamping setiap URL dengan today’s date pada setiap bangun. itu’s self-defeating: Mueller memiliki called ini “just lazy,” (terjemahan) “hanya lazy,” noting ini adalah trivial untuk mesin untuk recognize dan hanya membuat ini harder untuk them untuk spot genuinely updated halaman. Lie sering enough dan, di Google’s kata, “eventually we’re not going to believe you anymore.” (terjemahan) “eventually kami’re not going untuk believe Anda anymore.” Bing leans bahkan harder pada <lastmod> sebagai sebuah freshness signal daripada Google melakukan — so sebuah accurate date helps Anda pada both mesin, dan sebuah fake one hurts Anda pada both.

Placement, naming, encoding, dan compression

  • Placement/naming. There’s no diperlukan filename, tetapi /sitemap.xml di root adalah convention. oleh default sebuah sitemap hanya affects URLs di atau below -nya own path, so pertahankan ini tinggi enough untuk cover everything ini lists. one exception: Anda dapat host sebuah sitemap untuk sebuah berbeda situs jika Anda’ve verified ownership dari itu situs dan -nya robots.txt poin back untuk sitemap’s actual location — Google panggilan ini cross-submission, dan ini adalah mechanism behind sebuah sitemap indeks aggregating sitemaps hosted elsewhere.
  • Encoding. UTF-8, selalu.
  • Compression. Anda’re allowed untuk gzip sebuah sitemap (sajikan ini sebagai .xml.gz), which adalah worth doing pada besar files. penting nuance: ** 50MB cap adalah diukur uncompressed** — gzip saves bandwidth, not headroom terhadap size limit.

Limits → split + sitemap indeks

sebuah single sitemap adalah capped di 50 000 URLs atau 50MB uncompressed, whichever comes pertama. Google states ini directly: “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs.” (terjemahan) “semua formats limit sebuah single sitemap untuk 50MB (uncompressed) atau 50 000 URLs.” When Anda blow past either limit, Anda split list di seluruh multiple sitemap files dan reference them semua dari sebuah sitemap indeks — sebuah sitemap dari sitemaps. itu’s -nya own sibling topic; pendek versi adalah itu Anda submit indeks, dan one indeks dapat poin di up untuk 50 000 child sitemaps, so Anda’ll tidak pernah actually run out dari capacity.

Which URLs untuk sertakan — dan “exclude ≠ noindex” (terjemahan) “exclude ≠ noindex”

sertakan hanya URLs itu adalah dapat diindeks, canonical, dan kembalikan 200. itu berarti no 3xx redirects, no non-canonical duplicates, no noindex halaman, no robots-blocked URLs. sebuah clean sitemap dari exactly Anda dapat diindeks set adalah what membuat Search Console submitted-vs-terindeks comparison meaningful — pollute ini dengan junk dan Anda’ve thrown away diagnostic.

Now mechanical poin people get wrong: excluding sebuah URL dari Anda sitemap melakukan not deindex ini. sitemap adalah sebuah advertisement, not sebuah gate. menghapus sebuah URL’s entry hanya stops Anda advertising itu halaman; jika Google sudah knows tentang ini (via tautan, history, atau lainnya source) ini stays di indeks. satu-satunya mechanisms itu actually hapus sebuah halaman adalah sebuah noindex directive (dengan crawling allowed so Google dapat see ini), sebuah 404/410, atau removals alat. So “take it out of the sitemap” (terjemahan) “take ini out dari sitemap” adalah tidak pernah right jawaban untuk “how do I deindex this.” (terjemahan) “how melakukan I deindex ini.”

Accepted sitemap file formats

XML isn’t satu-satunya format Google accepts — worth knowing so Anda tidak assume Anda’re stuck hand-writing XML. Google panggilan XML “the most versatile of the sitemap formats,” (terjemahan) “paling versatile dari sitemap formats,” tetapi ini juga reads:

  • RSS 2,0 / Atom feeds — handy because banyak CMSs sudah publish one; mereka carry halaman URLs hanya.
  • mRSS — sebuah media RSS feed, digunakan untuk video.
  • Plain text (.txt) — literally one URL per line, web-halaman URLs hanya, UTF-8.

XML adalah masih right default because ini adalah satu-satunya format itu mendukung extensions (lastmod metadata, image, video, dan hreflang annotations). others adalah URL-hanya.

hreflang di sitemaps

jika Anda run sebuah multilingual atau multi-regional situs, sitemap adalah biasanya easiest place untuk manage hreflang — Anda maintain whole language cluster di one file alih-alih injecting kembalikan-tags ke setiap halaman template. (ini adalah one dari three valid places hreflang dapat live; <head> dan header HTTP adalah others.)

How ini adalah implemented. setiap <url> gets xhtml:link rel="alternate" children, one per language/region versi, dan Anda declare namespace xmlns:xhtml="http://www.w3.org/1999/xhtml" pada <urlset>:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://www.example.com/english/page.html</loc>
    <xhtml:link rel="alternate" hreflang="en" href="https://www.example.com/english/page.html"/>
    <xhtml:link rel="alternate" hreflang="de" href="https://www.example.de/deutsch/page.html"/>
    <xhtml:link rel="alternate" hreflang="x-default" href="https://www.example.com/english/page.html"/>
  </url>
  <!-- each alternate URL repeats the FULL set, including itself (return tags) -->
</urlset>

** kembalikan-tag aturan.** ini adalah bagian itu bites people. setiap <url> element harus list setiap alternate versi dari halaman — including itself. Google: “Each <url> element must have a child element <xhtml:link rel="alternate" hreflang="[supported_language-code]"> that lists every alternate version of the page, including itself.” (terjemahan) “setiap undefined element harus memiliki sebuah child element undefined itu lists setiap alternate versi dari halaman, including itself.” dan ini memiliki untuk menjadi bidirectional: “If page X links to page Y, page Y must link back to page X. If this is not the case for all pages that use hreflang annotations, those annotations may be ignored or not interpreted correctly.” (terjemahan) “jika halaman X tautan untuk halaman Y, halaman Y harus tautan back untuk halaman X. jika ini adalah not case untuk semua halaman itu gunakan hreflang annotations, itu annotations dapat menjadi ignored atau not interpreted correctly.” tambahkan sebuah x-default entry untuk unmatched-language fallback. sebuah single broken atau missing kembalikan-tag dapat invalidate whole set.

** cap counts <loc> URLs hanya.** sebuah relief untuk big international situs: 50 000-URL limit counts hanya <loc> halaman URLs, not hreflang alternates. So sebuah sitemap dengan 50 000 halaman, setiap dengan ten language alternates, masih fits — ini adalah location URLs itu count, not alternative URLs.

When ini actually goes live — budget days, not minutes. Here’s expectation untuk set, dan ini adalah mechanism alih-alih sebuah quotable line. Google parses Anda sitemap hreflang when ini re-fetches sitemap, tetapi annotations hanya take effect once semua URLs di set memiliki telah (re)di-crawl dan kembalikan-tags reconciled terhadap setiap lainnya. itu berarti there’s sebuah nyata lag antara publishing hreflang dan alternates menjadi honored, dan one slow-untuk-recrawl atau broken URL di set dapat hold rest up. Don’t expect ini untuk flip pada moment Anda submit — plan untuk ini untuk settle di atas days.

Reference ini dan submit ini

  • robots.txt — tambahkan sebuah Sitemap: line dengan full absolute URL. ini juga lets mesin auto-menemukan ini.
  • Google Search Console — Sitemaps report (atau Search Console API) adalah primary submission metode; ini adalah juga where Anda read submitted-vs-terindeks diagnostic.
  • Bing Webmaster alat — submit there too; Bing fetches ini quickly dan rechecks regularly.

One automation note dari how I think tentang ini: sebuah sitemap seharusnya menjadi generated automatically dari halaman Anda actually memiliki, so ini stays saat ini. sebuah hand-dibangun sitemap rots moment Anda situs perubahan. siblings untuk ini halaman — sitemaps overview, sitemap indeks untuk besar situs, dan image sitemap dan video sitemap extensions — cover rest dari family, dan broader penemuan topic ties sitemaps untuk lainnya cara mesin temukan Anda URLs.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.