Baiduspider: Robots.txt & Crawl Policy Reference
Technical reference for Baiduspider, the official web crawler for the Baidu search engine. Learn how to verify its traffic and manage its access.
AI Summary:
Baiduspideris the official web crawler for Baidu, the leading search engine in China. It crawls the web to build Baidu's search index. It respects standardrobots.txtdirectives. Because it is a major search engine, blocking Baiduspider will prevent your site from appearing in Baidu search results. Verify its traffic using reverse DNS lookups to ensure the IPs belong to*.baidu.comor*.baidu.jp.
Role and policy boundary
Baiduspider is the primary crawler for the Baidu search engine. It discovers and indexes web pages, images, and videos to provide search results to users, primarily in China. The crawler identifies itself using variations of the User-Agent string, most commonly containing Baiduspider (e.g., Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)).
As a major search engine crawler, its primary purpose is public indexing. Blocking Baiduspider means your content will not be discoverable by users searching on Baidu. Do not infer that its primary purpose is AI training, though like all major search engines, indexed data may inform their ecosystem.
If your logs confirm an exact Baiduspider token and you want to prevent your site from appearing in Baidu search results, publish:
User-agent: Baiduspider
Disallow: /
For selective access (e.g., hiding private sections from search):
User-agent: Baiduspider
Allow: /
Disallow: /private/
Disallow: /internal/
Disallow: /api/
Robots.txt is advisory and cannot protect private or licensed content. Use authentication, authorization, signed URLs, and origin controls for those boundaries.
Layered verification
Start with raw access logs and preserve the complete User-Agent, source IP, ASN, reverse DNS, method, path, status, response size, redirects, timestamp, and request rate. Because Baiduspider is a high-value target for spoofing by malicious scrapers, you must verify its authenticity.
Baidu provides a verification method via reverse DNS. Perform a reverse DNS (PTR) lookup on the accessing IP address. A genuine Baiduspider IP will resolve to a hostname ending in *.baidu.com or *.baidu.jp. You can then perform a forward DNS lookup on that hostname to ensure it matches the original IP.
Analyze behavior without assigning purpose prematurely. Requests for public pages, feeds, sitemaps, and metadata resemble authorized search indexing; deep traversal of private areas, high concurrency ignoring crawl delays, repeated retries, or private API access may indicate spoofing. These patterns demonstrate operational impact but cannot prove the operator or downstream use.
Evaluate /robots.txt independently. Confirm the canonical host, response status, content type, exact user-agent group, and path match. A page-level directive may express a discoverability preference:
<meta name="Baiduspider" content="noindex, nofollow">
X-Robots-Tag: noindex, nofollow
These signals do not establish an opt-out for an undocumented client and do not secure private routes. Use authenticated delivery, signed URLs, and application authorization.
WAF and Nginx remediation examples
Once logs confirm an exact unwanted token (e.g., a spoofed bot failing reverse DNS verification, or if you intentionally want to block Baidu globally), a narrow WAF rule can block the declared identity. Replace the example expression if your observed header differs:
{
"description": "Block observed Baiduspider token",
"expression": "lower(http.user_agent) contains \"baiduspider\"",
"action": "block"
}
For Nginx, scope enforcement to private and high-cost routes while investigating public access:
map $http_user_agent $block_baiduspider {
default 0;
~*Baiduspider 1;
}
server {
location ~ ^/(private|internal|account|uploads|paywall|api)/ {
if ($block_baiduspider) { return 403; }
try_files $uri $uri/ =404;
}
}
A User-Agent rule is easy to spoof or evade and may block a legitimate client using the substring. Do not create an IP allowlist or broad network block without current operator evidence. Test browsers, social previews, feed readers, search crawlers, approved monitors, and customer integrations. Pair edge matching with authentication, rate limits, signed assets, and anomaly detection.
Review checklist
Search logs for every exact header that may be associated with Baiduspider and preserve representative requests. Record paths, response sizes, statuses, source networks, timing, and rate. Verify the traffic by performing a reverse DNS lookup to ensure the hostname ends in *.baidu.com or *.baidu.jp.
Decide whether your objective is to preserve search visibility in China, prevent extraction, protect private content, or reduce crawl load. Publish a targeted robots group only for the exact observed token, enforce sensitive routes with WAF and application controls, and test docs, media, feeds, sitemaps, uploads, and APIs separately.
References
- Baidu Webmaster Platform (Baiduspider FAQs) — official documentation portal for Baiduspider, accessed 2026-08-24.
- Google Robots.txt Introduction — general explanation of crawler directives and their limitations.
- RFC 9309 — Robots Exclusion Protocol standard; it does not authenticate a User-Agent.
Need to optimize your entire site for AI search visibility? Run a comprehensive audit with Geolify.ai.