In short. Baidu documents *.baidu.com and *.baidu.jp for Baiduspider reverse-DNS checks.
Definition: Baidu documents
*.baidu.comand*.baidu.jpas the reverse-DNS hostname patterns for Baiduspider. Its authenticity check starts by reverse-resolving the request IP and treating a hostname outside those patterns as an impersonation.
Key facts
- Baidu describes Baiduspider as the automatic program of Baidu's search engine that visits web pages and builds an index database. Baidu's Baiduspider introduction gives that definition.
- The page lists
*.baidu.comand*.baidu.jpas the hostname patterns for Baiduspider and labels a hostname outside either pattern as an impersonation. - Baidu documents
hostfor Linux,nslookupfor Windows or IBM OS/2, anddigfor macOS as reverse-lookup commands. - RFC 1035 defines the
IN-ADDR.ARPAdomain for mapping Internet addresses to host names and says that PTR records point to primary host names. - RFC 1912 recommends matching PTR and A records, with the PTR record pointing to a valid A record.
Which hostname endings does Baidu list?
Baidu's page, dated 24 April 2013, gives the following two patterns in its section on identifying an impersonated crawler:
*.baidu.com
*.baidu.jp
The asterisk and dot are part of the patterns shown by Baidu. The page says that a Baiduspider hostname uses either format and that a hostname outside either format is an impersonation. The two examples on the page show a crawler name under crawl.baidu.com and another under crawl.baidu.jp:
baiduspider-123-125-66-120.crawl.baidu.com.
BaiduMobaider-119-63-195-254.crawl.baidu.jp.
The second example preserves the spelling shown in Baidu's command output. The trailing dot is also present in that output.
How does the reverse-DNS check work?
Reverse DNS maps an IP address to a host name through a PTR lookup. RFC 1035 describes IN-ADDR.ARPA as a special domain for Internet address to host mapping. Its address labels follow the Internet addressing structure in reverse order, and the RFC gives 10.2.0.52 as 52.0.2.10.IN-ADDR.ARPA. PTR records point from the address node to a primary host name.
Baidu's documented commands are:
host 123.125.66.120
nslookup xxx.xxx.xxx.xxx
dig xxx.xxx.xxx.xxx
The page associates the first command with Linux, the second with Windows or IBM OS/2, and the third with macOS. The output of the lookup supplies the hostname to compare with the two Baidu patterns.
RFC 1035 also separates this method from DNS inverse queries. It says inverse queries are not an acceptable method for mapping host addresses to host names and directs implementations to use IN-ADDR.ARPA.
What second check does the DNS guidance support?
The Baidu page specifies the hostname comparison. RFC 1912 adds a DNS consistency check: for every IP address, a matching PTR record should exist in in-addr.arpa, and the PTR record should point back to a valid A record. That gives a practical second lookup after a returned hostname matches a Baidu suffix.
RFC 1035 warns that the reverse-mapping data and the normal host-name data can be inconsistent because they live in different zones. A log review can therefore record the request IP, the PTR result, and the forward A result separately. Baidu's page also tells operators to inspect access logs when checking whether someone is impersonating Baiduspider.
How should a site operator apply the check?
Start with the IP address in the access log. Run the platform command, inspect the PTR hostname, and compare the complete name with *.baidu.com or *.baidu.jp. Then resolve that hostname and compare the returned A record with the logged IP, following the consistency guidance in RFC 1912. The Baidu page names the hostname suffixes and commands; it does not give a DNS resolver configuration or a DNSSEC procedure.
Related terms
FAQ
Which suffixes does Baidu document for Baiduspider?
The documented patterns are *.baidu.com and *.baidu.jp. Baidu says a hostname outside either pattern is an impersonation.
Which command should you use for a reverse lookup?
Use host on Linux, nslookup on Windows or IBM OS/2, and dig on macOS, as listed on Baidu's page.
Should the PTR result be checked against an A record?
Yes. RFC 1912 recommends that PTR and A records match and that a PTR record point to a valid A record. Baidu's page supplies the suffix comparison that starts the check.
Sources
- Baidu Search Resource Platform, "百度spider介绍", 24 April 2013
- IETF, "Domain Implementation and Specification", November 1987
- IETF, "Common DNS Errors", February 1996
Check how a page reads to answer engines. Open the GEO score analyzer