จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
จัดการ Sitemap ด้วยไฟล์ดัชนี Sitemap
หาก Sitemap เกินขีดจํากัดขนาด คุณจะต้องแยก Sitemap ขนาดใหญ่ออกเป็นหลายๆ ไฟล์เพื่อให้ Sitemap ใหม่แต่ละรายการมีขนาดต่ำกว่าขีดจำกัด เมื่อแยก Sitemap แล้ว คุณสามารถใช้ไฟล์ดัชนี Sitemap เพื่อส่ง Sitemap หลายรายการได้ในครั้งเดียว
แนวทางปฏิบัติแนะนําเกี่ยวกับดัชนี Sitemap
รูปแบบ XML ของไฟล์ดัชนี Sitemap จะคล้ายกับรูปแบบ XML ของไฟล์ Sitemap มาก และจะกำหนดโดยโปรโตคอล Sitemap
ซึ่งหมายความว่าข้อกําหนดทั้งหมดสำหรับ Sitemap จะมีผลกับไฟล์ดัชนี Sitemap ด้วย
Sitemap ที่อ้างอิงต้องโฮสต์ในเว็บไซต์เดียวกันกับไฟล์ดัชนี Sitemap ระบบจะยกเว้นข้อกำหนดนี้หากคุณตั้งค่าการส่งข้ามเว็บไซต์
Sitemap ที่อ้างอิงในไฟล์ดัชนี Sitemap ต้องอยู่ในไดเรกทอรีเดียวกับไฟล์ดัชนี Sitemap หรืออยู่ต่ำลงไปในลำดับชั้นของเว็บไซต์ ตัวอย่างเช่น หากไฟล์ดัชนี Sitemap อยู่ที่ https://example.com/public/sitemap_index.xml
ก็จะมีได้เฉพาะ Sitemap ที่อยู่ในไดเรกทอรีเดียวกันหรือลึกกว่า เช่น https://example.com/public/shared/...
คุณส่งไฟล์ดัชนี Sitemap ได้สูงสุด 500 ไฟล์สําหรับแต่ละเว็บไซต์ในบัญชี Search Console
ตัวอย่างดัชนี Sitemap
ตัวอย่างต่อไปนี้แสดงดัชนี Sitemap ในรูปแบบ XML ที่มี Sitemap 2 รายการ
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://www.example.com/sitemap1.xml.gz</loc>
<lastmod>2024-08-15</lastmod>
</sitemap>
<sitemap>
<loc>https://www.example.com/sitemap2.xml.gz</loc>
<lastmod>2022-06-05</lastmod>
</sitemap>
</sitemapindex>
การอ้างอิงดัชนี Sitemap
แท็กดัชนี Sitemap จะกําหนดโดยเนมสเปซเดียวกันกับ Sitemap แบบที่ใช้ทั่วไปดังนี้
http://www.sitemaps.org/schemas/sitemap/0.9
เพื่อให้แน่ใจว่า Google จะใช้ดัชนี Sitemap ได้ คุณต้องใช้แท็กที่จำเป็นต่อไปนี้
แท็กที่จำเป็น |
sitemapindex |
แท็กระดับบนของแผนผัง XML ซึ่งประกอบด้วยแท็กอื่นๆ ทั้งหมด |
sitemap |
แท็กระดับบนสําหรับ Sitemap แต่ละรายการที่แสดงอยู่ในไฟล์ ซึ่งเป็นแท็กย่อยโดยตรงเพียงแท็กเดียวของแท็ก sitemapindex
|
loc |
ตําแหน่ง (URL) ของ Sitemap ซึ่งเป็นแท็กย่อยของแท็ก sitemap ไฟล์ดัชนี Sitemap สามารถมีแท็ก loc ได้สูงสุด 50,000 รายการ
|
นอกจากนี้ แท็กที่ไม่บังคับต่อไปนี้อาจช่วยให้ Google กําหนดเวลาทำการ Crawl Sitemap ได้
แท็กที่ไม่บังคับ |
lastmod |
ระบุเวลาที่มีการแก้ไขไฟล์ Sitemap ที่เกี่ยวข้อง โดยอาจเป็นแท็กย่อยของแท็ก sitemap ค่าของแท็ก lastmod ต้องอยู่ในรูปแบบ W3C Datetime
|
แหล่งข้อมูลเพิ่มเติม
หากต้องการข้อมูลเพิ่มเติม ลองไปที่แหล่งข้อมูลต่อไปนี้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-04 UTC
[null,null,["อัปเดตล่าสุด 2025-08-04 UTC"],[[["\u003cp\u003eA sitemap index file is used to submit multiple sitemaps to search engines, especially when a single sitemap exceeds the size limit.\u003c/p\u003e\n"],["\u003cp\u003eSitemaps listed within the index file must reside on the same site (unless cross-site submission is configured) and be in the same directory or a lower subdirectory.\u003c/p\u003e\n"],["\u003cp\u003eYou can submit up to 500 sitemap index files for each website registered in your Search Console account.\u003c/p\u003e\n"],["\u003cp\u003eSitemap index files have a specific XML format, similar to sitemaps, and include required tags like \u003ccode\u003esitemapindex\u003c/code\u003e, \u003ccode\u003esitemap\u003c/code\u003e, and \u003ccode\u003eloc\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eOptional tags like \u003ccode\u003elastmod\u003c/code\u003e can be added to indicate the last modification time of the sitemap file, aiding in crawl scheduling by search engines.\u003c/p\u003e\n"]]],["When a sitemap exceeds size limits, split it into smaller sitemaps. Use a sitemap index file to manage and submit multiple sitemaps simultaneously. The sitemap index's XML format mirrors that of a sitemap and follows the Sitemap Protocol. Referenced sitemaps must be on the same site or lower in the directory, or use cross-site submission. A sitemap index can contain up to 50,000 `loc` tags, with `sitemapindex`, `sitemap`, and `loc` being required. Up to 500 sitemap indexes can be submitted per site.\n"],null,["# Manage Your Sitemaps With Sitemap Index Files | Google Search Central\n\nManage your sitemaps with a sitemap index file\n==============================================\n\n\nIf you have a sitemap that exceeds the\n[size limits](/search/docs/crawling-indexing/sitemaps/build-sitemap),\nyou'll need to split up your large sitemap into multiple sitemaps such that each new sitemap\nis below the size limit. Once you've split up your sitemap, you can use a sitemap index file\nas a way to submit many sitemaps at once.\n\nSitemap index best practices\n----------------------------\n\n\nThe XML format of a sitemap index file is very\nsimilar to the XML format of a sitemap file, and it's defined by the\n[Sitemap Protocol](https://www.sitemaps.org/protocol.html#index).\nThis means that all the sitemap requirements apply to sitemap index files also.\n\n\nThe referenced sitemaps must be hosted on the same site as your sitemap index file. This\nrequirement is waived if you set up\n[cross-site submission](/search/docs/crawling-indexing/sitemaps/build-sitemap#cross-submit).\n\n\nSitemaps that are referenced in the sitemap index file must be in the same\ndirectory as the sitemap index file, or lower in the site hierarchy. For example, if the\nsitemap index file is at `https://example.com/public/sitemap_index.xml`, it can\nonly contain sitemaps that are in the same or deeper directory, like\n`https://example.com/public/shared/...`.\n\n\nYou can submit up to 500 sitemap index files for each site in your Search Console account.\n\nExample sitemap index\n---------------------\n\n\nThe following example shows a sitemap index in XML format that lists two sitemaps: \n\n```world-of-warcraft-toc\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003csitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n \u003csitemap\u003e\n \u003cloc\u003ehttps://www.example.com/sitemap1.xml.gz\u003c/loc\u003e\n \u003clastmod\u003e2024-08-15\u003c/lastmod\u003e\n \u003c/sitemap\u003e\n \u003csitemap\u003e\n \u003cloc\u003ehttps://www.example.com/sitemap2.xml.gz\u003c/loc\u003e\n \u003clastmod\u003e2022-06-05\u003c/lastmod\u003e\n \u003c/sitemap\u003e\n\u003c/sitemapindex\u003e\n```\n\nSitemap index reference\n-----------------------\n\n\nThe sitemap index tags are defined by the same namespace as generic sitemaps:\n[`http://www.sitemaps.org/schemas/sitemap/0.9`](http://www.sitemaps.org/schemas/sitemap/0.9)\n\nTo make sure Google can use your sitemap index, you must use the following required tags:\n\n| Required tags ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------|\n| `sitemapindex` | The root tag of the XML tree. It contains all the other tags. |\n| `sitemap` | The parent tag for each sitemap listed in the file. It's the only direct child of the `sitemapindex` tag. |\n| `loc` | The location (URL) of the sitemap. It's a child of the `sitemap` tag. A sitemap index file may have up to 50,000 `loc` tags. |\n\n\nAdditionally, the following optional tags may help Google schedule your sitemaps for crawling:\n\n| Optional tags ||\n|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `lastmod` | Identifies the time that the corresponding sitemap file was modified. It can be a child of a `sitemap` tag. The value for the `lastmod` tag must be in [W3C Datetime format](https://www.w3.org/TR/NOTE-datetime). |\n\nAdditional resources\n--------------------\n\n\nWant to learn more? Check out the following resources:\n\n- [Submit your sitemap to Google](/search/docs/crawling-indexing/sitemaps/build-sitemap#addsitemap)\n- [Learn how to combine sitemap extensions](/search/docs/crawling-indexing/sitemaps/combine-sitemap-extensions)"]]