ภาพรวมโปรแกรมรวบรวมข้อมูลของ Google (User Agent)
"โปรแกรมรวบรวมข้อมูล" (บางครั้งเรียกว่า "โรบ็อต" หรือ "สไปเดอร์") เป็นคําทั่วไปที่ใช้เรียกโปรแกรมสํารวจและสแกนเว็บไซต์ด้วยการติดตามลิงก์จากหน้าเว็บหนึ่งไปยังอีกหน้าเว็บหนึ่งโดยอัตโนมัติ โปรแกรมรวบรวมข้อมูลหลักของ Google เรียกว่า Googlebot ตารางนี้แสดงรายละเอียดโปรแกรมรวบรวมข้อมูลทั่วไปของ Google ที่อาจพบในบันทึกผู้อ้างอิง และวิธีระบุโปรแกรมดังกล่าวไว้ใน robots.txt , เมตาแท็ก robots และคำสั่ง HTTP ของ X-Robots-Tag
ตารางต่อไปนี้แสดงโปรแกรมรวบรวมข้อมูลที่ผลิตภัณฑ์และบริการต่างๆ ใช้ที่ Google
โทเค็น User Agent จะใช้ในบรรทัด User-agent:
ของ robots.txt เพื่อจับคู่กับประเภทโปรแกรมรวบรวมข้อมูลเมื่อเขียนกฎการรวบรวมข้อมูลสำหรับเว็บไซต์ โปรแกรมรวบรวมข้อมูลบางตัวมีมากกว่า 1 โทเค็นดังที่แสดงในตาราง คุณต้องจับคู่โทเค็นของโปรแกรมรวบรวมข้อมูลเพียง 1 โปรแกรมเท่านั้นเพื่อใช้กฎ รายการนี้ไม่สมบูรณ์ แต่ครอบคลุมโปรแกรมรวบรวมข้อมูลส่วนใหญ่ที่อาจเห็นในเว็บไซต์
สตริง User Agent แบบเต็ม เป็นคำอธิบายแบบเต็มของโปรแกรมรวบรวมข้อมูล และจะปรากฏในคำขอ HTTP และบันทึกการใช้เว็บ
โปรแกรมรวบรวมข้อมูล
โทเค็น User Agent
APIs-Google
สตริง User Agent แบบเต็ม
APIs-Google (+https://developers.google.com/webmasters/APIs-Google.html)
AdsBot Mobile Web Android
ตรวจสอบคุณภาพโฆษณาในหน้าเว็บ ของ Android
โทเค็น User Agent
AdsBot-Google-Mobile
สตริง User Agent แบบเต็ม
Mozilla/5.0 (Linux; Android 5.0; SM-G920A) AppleWebKit (KHTML, like Gecko) Chrome Mobile Safari (compatible; AdsBot-Google-Mobile; +http://www.google.com/mobile/adsbot.html)
AdsBot Mobile Web
ตรวจสอบคุณภาพโฆษณาในหน้าเว็บ ของ iPhone
โทเค็น User Agent
AdsBot-Google-Mobile
สตริง User Agent แบบเต็ม
Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1 (compatible; AdsBot-Google-Mobile; +http://www.google.com/mobile/adsbot.html)
AdsBot
ตรวจสอบคุณภาพโฆษณาในหน้าเว็บ ของเดสก์ท็อป
โทเค็น User Agent
AdsBot-Google
สตริง User Agent แบบเต็ม
AdsBot-Google (+http://www.google.com/adsbot.html)
โทเค็น User Agent
Mediapartners-Google
สตริง User Agent แบบเต็ม
Mediapartners-Google
Googlebot Image
โทเค็น User Agent
Googlebot-Image
Googlebot
สตริง User Agent แบบเต็ม
Googlebot-Image/1.0
Googlebot News
Googlebot Video
โทเค็น User Agent
Googlebot-Video
Googlebot
สตริง User Agent แบบเต็ม
Googlebot-Video/1.0
โทเค็น User Agent
Googlebot
สตริง User Agent แบบเต็ม
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Googlebot/2.1; +http://www.google.com/bot.html) Chrome/W.X.Y.Z Safari/537.36
Googlebot/2.1 (+http://www.google.com/bot.html)
โทเค็น User Agent
Googlebot
สตริง User Agent แบบเต็ม
Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/W.X.Y.Z Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
โทเค็น User Agent
Mediapartners-Google
สตริง User Agent แบบเต็ม
(Various mobile device types) (compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)
Mobile Apps Android
ตรวจสอบคุณภาพโฆษณา ในหน้าแอป Android ปฏิบัติตามกฎของโรบ็อต AdsBot-Google
โทเค็น User Agent
AdsBot-Google-Mobile-Apps
สตริง User Agent แบบเต็ม
AdsBot-Google-Mobile-Apps
โทเค็น User Agent
FeedFetcher-Google
สตริง User Agent แบบเต็ม
FeedFetcher-Google; (+http://www.google.com/feedfetcher.html)
โทเค็น User Agent
Google-Read-Aloud
สตริง User Agent แบบเต็ม
Agent ปัจจุบัน :
Agent ในเดสก์ท็อป: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36 (compatible; Google-Read-Aloud; +https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers)
Agent ในอุปกรณ์เคลื่อนที่: Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers)
Agent เดิม (เลิกใช้งาน ) :
google-speakr
โทเค็น User Agent
DuplexWeb-Google
สตริง User Agent แบบเต็ม
Mozilla/5.0 (Linux; Android 11; Pixel 2; DuplexWeb-Google/1.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Mobile Safari/537.36
ข้อควรระวัง : สำหรับคำขอที่เริ่มโดยผู้ใช้ Google Favicon จะไม่สนใจกฎของ robots.txt
โทเค็น User Agent
Googlebot-Image
Googlebot
สตริง User Agent แบบเต็ม
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Google Favicon
โทเค็น User Agent
googleweblight
สตริง User Agent แบบเต็ม
Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko; googleweblight) Chrome/38.0.1025.166 Mobile Safari/535.19
Google StoreBot
โทเค็น User Agent
Storebot-Google
สตริง User Agent แบบเต็ม
Agent ในเดสก์ท็อป:
Mozilla/5.0 (X11; Linux x86_64; Storebot-Google/1.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
Agent ในอุปกรณ์เคลื่อนที่:
Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012; Storebot-Google/1.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36
หมายเหตุเกี่ยวกับChrome/W.X.Y.Z ใน User Agent
เมื่อใดที่เห็นสตริง Chrome/W.X.Y.Z ในสตริง User Agent ในตาราง W.X.Y.Z คือตัวยึดตำแหน่งจริงๆ ที่แสดงถึงเวอร์ชันของเบราว์เซอร์ Chrome ที่ใช้โดย User Agent ดังกล่าว เช่น 41.0.2272.96
หมายเลขเวอร์ชันนี้จะเพิ่มขึ้นเมื่อเวลาผ่านไปเพื่อจับคู่กับ Chromium เวอร์ชันที่เผยแพร่ล่าสุดซึ่ง Googlebot ใช้
หากกำลังค้นหาบันทึกหรือกรองเซิร์ฟเวอร์สำหรับ User Agent ที่มีรูปแบบนี้ ให้ใช้ไวลด์การ์ดหมายเลขเวอร์ชันแทนการระบุหมายเลขเวอร์ชันที่ถูกต้อง
User Agent ใน robots.txt
เมื่อระบบรู้จัก User Agent หลายตัวในไฟล์ robots.txt แล้ว Google จะดำเนินการตาม User Agent ที่เจาะจงที่สุด หากต้องการให้โปรแกรมของ Google ทั้งหมดรวบรวมข้อมูลหน้าเว็บได้ คุณไม่จำเป็นต้องใช้ไฟล์ robots.txt เลย แต่หากต้องการบล็อกหรืออนุญาตให้เข้าถึงเนื้อหาบางส่วน สามารถทำได้โดยระบุ Googlebot เป็น User Agent ตัวอย่างเช่น ไม่จำเป็นต้องใช้ไฟล์ robots.txt หากต้องการให้หน้าทั้งหมดปรากฏใน Google Search และหากต้องการให้โฆษณา AdSense ปรากฏในหน้า เช่นเดียวกัน หากต้องการบล็อกไม่ให้ Google เข้าถึงบางหน้าโดยสมบูรณ์ การบล็อก User Agent ของ Googlebot
จะบล็อก User Agent อื่นๆ ทั้งหมดของ Google ด้วย
แต่หากต้องการการควบคุมที่ละเอียดยิ่งขึ้น คุณระบุให้เจาะจงกว่าเดิมได้ ตัวอย่างเช่น คุณอาจต้องการให้หน้าทั้งหมดปรากฏใน Google Search แต่ไม่ต้องการให้มีการรวบรวมข้อมูลรูปภาพในไดเรกทอรีส่วนตัว ในกรณีนี้ ให้ใช้ robots.txt เพื่อไม่อนุญาตให้ User Agent ของ Googlebot-Image
รวบรวมข้อมูลไฟล์ในไดเรกทอรีส่วนตัว (แต่อนุญาตให้ Googlebot รวบรวมข้อมูลไฟล์ทั้งหมด) ดังต่อไปนี้
User-agent: Googlebot
Disallow:
User-agent: Googlebot-Image
Disallow: /personal
อีกตัวอย่างหนึ่ง เช่น สมมติว่าต้องการแสดงโฆษณาในหน้าทั้งหมด แต่ไม่ต้องการให้หน้าเหล่านั้นปรากฏใน Google Search คุณบล็อก Googlebot แต่อนุญาต User Agent ของ Mediapartners-Google
ได้ดังต่อไปนี้
User-agent: Googlebot
Disallow: /
User-agent: Mediapartners-Google
Disallow:
บางหน้าจะใช้เมตาแท็ก robots หลายตัวเพื่อระบุคำสั่งสำหรับโปรแกรมรวบรวมข้อมูลต่างๆ ดังต่อไปนี้
<meta name="robots" content="nofollow">
<meta name="googlebot" content="noindex">
ในกรณีนี้ Google จะใช้ผลรวมของคำสั่งเชิงลบ และ Googlebot จะทำตามทั้งคำสั่ง noindex
และ nofollow
ข้อมูลโดยละเอียดเพิ่มเติมเกี่ยวกับการควบคุมวิธีที่ Google รวบรวมข้อมูลและจัดทำดัชนีเว็บไซต์
การควบคุมความเร็วในการรวบรวมข้อมูล
โปรแกรมรวบรวมข้อมูลของ Google แต่ละโปรแกรมจะเข้าถึงเว็บไซต์เพื่อวัตถุประสงค์เฉพาะในอัตราที่ต่างกัน Google ใช้อัลกอริทึมเพื่อกำหนดอัตราการรวบรวมข้อมูลที่เหมาะสมสำหรับแต่ละเว็บไซต์ หากโปรแกรมรวบรวมข้อมูลของ Google รวบรวมข้อมูลเว็บไซต์ของคุณบ่อยเกินไป คุณลดอัตราการรวบรวมข้อมูล ได้