尝试在 Google 网站站长工具 ->
上添加我的网站时,出现错误“网络无法访问:robots.txt 无法访问”http://www.hyponomist.com/
你可以查看我的robots.txt at here和 sitemap.xml at here
我到处阅读其他帖子,但无法解决/理解。是什么导致了这个问题。另外,我尝试使用 Fetch as Googlebot 工具下载页面,但遇到了同样的错误。
有人知道吗?
提前致谢!
最佳答案
当用户代理字符串表明请求来自 Googlebot 时,您的网络服务器会返回 503 错误,但当请求来自浏览器时,会返回 200 错误。如果您使用 Fiddler ( http://fiddler2.com/ ) 等 http 诊断工具,您可以看到这一点。
如果您使用 Fiddler 发送浏览器发送的相同请求:
GET http://www.hyponomist.com/robots.txt HTTP/1.1
Host: www.hyponomist.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.72 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
响应是:
HTTP/1.1 200 OK
Server: nginx/1.4.4
Date: Fri, 10 Jan 2014 21:34:42 GMT
Content-Type: text/plain; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Retry-After: 18000
Last-Modified: Fri, 10 Jan 2014 20:43:28 GMT
Content-Encoding: gzip
如果您更改用户代理以模仿 Googlebot:
GET http://www.hyponomist.com/robots.txt HTTP/1.1
Host: www.hyponomist.com
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
User-Agent: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
那么响应是:
HTTP/1.1 503 Service Temporarily Unavailable
Server: nginx/1.4.4
Date: Fri, 10 Jan 2014 21:35:25 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 234
Connection: keep-alive
Retry-After: 18000
具体为什么要这样做,我无法告诉你。 503 通常是服务器暂时过载时发送的错误,但这里显然不是这种情况。也许您的防火墙配置不当,并且已根据请求频率将 Googlebot 列入黑名单?查看您的防火墙设置和服务器配置。
关于robots.txt - 网络无法访问 : robots. txt 无法访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21041820/