{"id":969,"date":"2010-03-18T11:41:00","date_gmt":"2010-03-18T03:41:00","guid":{"rendered":""},"modified":"2013-11-25T20:51:30","modified_gmt":"2013-11-25T12:51:30","slug":"robots-txt-disallow%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/969.html","title":{"rendered":"robots.txt Disallow\u7528\u6cd5"},"content":{"rendered":"<p>robots.txt\u653e\u4e8e\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u9762\uff0c\u7528\u6765\u63a7\u5236Google\u7684\u7f51\u7edc\u673a\u5668\u4eba\u4e0d\u6293\u53d6\u4f60\u60f3\u8981\u54ea\u4e9b\u5185\u5bb9\u4e0d\u88ab\u6293\u53d6\u7684\u3002<\/p>\n<p>Disallow \u884c\u5217\u51fa\u7684\u662f\u60a8\u8981\u62e6\u622a\u7684\u7f51\u9875\u3002 \u60a8\u53ef\u4ee5\u5217\u51fa\u67d0\u4e00\u5177\u4f53\u7f51\u5740\u6216\u7f51\u5740\u6a21\u5f0f\u3002 \u6761\u76ee\u5e94\u4ee5\u6b63\u659c\u6760 (\/) \u5f00\u5934\u3002<\/p>\n<p>\u8981\u62e6\u622a\u6574\u4e2a\u7f51\u7ad9\uff0c\u8bf7\u4f7f\u7528\u6b63\u659c\u625b\u3002<br \/>\nDisallow: \/<\/p>\n<p>\u8981\u62e6\u622a\u76ee\u5f55\u53ca\u5176\u4e2d\u7684\u6240\u6709\u5185\u5bb9\uff0c\u8bf7\u5728\u76ee\u5f55\u540d\u540e\u6dfb\u52a0\u6b63\u659c\u6760\u3002<br \/>\nDisallow: \/junk-directory\/<\/p>\n<p>\u8981\u62e6\u622a\u67d0\u4e2a\u7f51\u9875\uff0c\u8bf7\u5217\u51fa\u8be5\u7f51\u9875\u3002<br \/>\nDisallow: \/private_file.html<\/p>\n<p>\u8981\u4ece Google \u56fe\u7247\u641c\u7d22\u4e2d\u5220\u9664\u7279\u5b9a\u56fe\u7247\uff0c\u8bf7\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff1a<br \/>\nUser-agent: Googlebot-Image<br \/>\nDisallow: \/images\/\u72d7.jpg<\/p>\n<p>\u8981\u4ece Google \u56fe\u7247\u641c\u7d22\u4e2d\u5220\u9664\u7f51\u7ad9\u4e0a\u7684\u6240\u6709\u56fe\u7247\uff1a<br \/>\nUser-agent: Googlebot-Image<br \/>\nDisallow: \/<\/p>\n<p>\u8981\u62e6\u622a\u67d0\u4e00\u7279\u5b9a\u6587\u4ef6\u7c7b\u578b\u7684\u6587\u4ef6\uff08\u4f8b\u5982 .gif\uff09\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u5185\u5bb9\uff1a<br \/>\nUser-agent: Googlebot<br \/>\nDisallow: \/*.gif$<\/p>\n<p>\u8981\u5728\u963b\u6b62\u7f51\u7ad9\u9875\u9762\u88ab\u6293\u53d6\u7684\u540c\u65f6\u4ecd\u7136\u5728\u8fd9\u4e9b\u9875\u9762\u4e0a\u663e\u793a AdSense \u5e7f\u544a\uff0c\u8bf7\u7981\u6b62\u9664 Mediapartners-Google \u4ee5\u5916\u7684\u6240\u6709\u6f2b\u6e38\u5668\u3002 \u8fd9\u6837\u53ef\u4f7f\u9875\u9762\u4e0d\u51fa\u73b0\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\uff0c\u540c\u65f6\u53c8\u80fd\u8ba9 Mediapartners-Google \u6f2b\u6e38\u5668\u5206\u6790\u9875\u9762\uff0c\u4ece\u800c\u786e\u5b9a\u8981\u5c55\u793a\u7684\u5e7f\u544a\u3002 Mediapartners-Google \u6f2b\u6e38\u5668\u5e76\u4e0d\u4e0e\u5176\u4ed6 Google User-agent \u5171\u4eab\u7f51\u9875\u3002 \u4f8b\u5982\uff1a<br \/>\nUser-agent: *<br \/>\nDisallow: \/folder1\/<\/p>\n<p>User-agent: Mediapartners-Google<br \/>\nAllow: \/folder1\/<\/p>\n<p>\u8bf7\u6ce8\u610f\uff0c\u6307\u4ee4\u533a\u5206\u5927\u5c0f\u5199\u3002 \u4f8b\u5982\uff0c Disallow: \/junk_file.asp \u4f1a\u62e6\u622a http:\/\/www.example.com\/junk_file.asp\uff0c\u4f46\u4f1a\u5141\u8bb8 http:\/\/www.example.com\/Junk_file.asp\u3002<\/p>\n<p>\u6a21\u5f0f\u5339\u914d<\/p>\n<p>Googlebot\uff08\u4f46\u4e0d\u662f\u6240\u6709\u641c\u7d22\u5f15\u64ce\uff09\u9075\u5faa\u67d0\u4e9b\u6a21\u5f0f\u5339\u914d\u3002<\/p>\n<p>\u8981\u5339\u914d\u8fde\u7eed\u5b57\u7b26\uff0c\u8bf7\u4f7f\u7528\u661f\u53f7 (*)\u3002\u4f8b\u5982\uff0c\u8981\u62e6\u622a\u5bf9\u6240\u6709\u4ee5 private \u5f00\u5934\u7684\u5b50\u76ee\u5f55\u7684\u8bbf\u95ee\uff1a<br \/>\nUser-agent: Googlebot<br \/>\nDisallow: \/private*\/<\/p>\n<p>\u8981\u62e6\u622a\u5bf9\u6240\u6709\u5305\u542b\u95ee\u53f7 (?) \u7684\u7f51\u5740\u7684\u8bbf\u95ee\uff08\u5177\u4f53\u5730\u8bf4\uff0c\u8fd9\u79cd\u7f51\u5740\u4ee5\u60a8\u7684\u57df\u540d\u5f00\u5934\uff0c\u540e\u63a5\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u662f\u95ee\u53f7\uff0c\u800c\u540e\u53c8\u662f\u4efb\u610f\u5b57\u7b26\u4e32\uff09\uff0c\u53ef\u4f7f\u7528\u4ee5\u4e0b\u6761\u76ee\uff1a<br \/>\nUser-agent: Googlebot<br \/>\nDisallow: \/*?<\/p>\n<p>\u8981\u6307\u5b9a\u4e0e\u67d0\u4e2a\u7f51\u5740\u7684\u7ed3\u675f\u5b57\u7b26\u76f8\u5339\u914d\uff0c\u8bf7\u4f7f\u7528 $\u3002 \u4f8b\u5982\uff0c\u8981\u62e6\u622a\u4ee5 .xls \u7ed3\u675f\u7684\u6240\u6709\u7f51\u5740\uff0c\u8bf7\u4f7f\u7528\uff1a<br \/>\nUser-agent: Googlebot<br \/>\nDisallow: \/*.xls$<\/p>\n<p>\u60a8\u53ef\u5c06\u6b64\u6a21\u5f0f\u5339\u914d\u4e0e Allow \u6307\u4ee4\u914d\u5408\u4f7f\u7528\u3002 \u4f8b\u5982\uff0c\u5982\u679c ? \u4ee3\u8868\u4e00\u4e2a\u4f1a\u8bdd ID\uff0c\u60a8\u53ef\u80fd\u5e0c\u671b\u6392\u9664\u5305\u542b ? \u7684\u6240\u6709\u7f51\u5740\uff0c\u4ee5\u4fbf\u786e\u4fdd Googlebot \u4e0d\u4f1a\u6293\u53d6\u91cd\u590d\u7f51\u9875\u3002 \u4f46\u662f\u4ee5 ? \u7ed3\u675f\u7684\u7f51\u5740 \u53ef\u80fd\u662f\u60a8\u5e0c\u671b\u5305\u542b\u7684\u7f51\u9875\u7684\u7248\u672c\u3002 \u5728\u6b64\u60c5\u51b5\u4e0b\uff0c\u60a8\u53ef\u4ee5\u5bf9 robots.txt \u6587\u4ef6\u8fdb\u884c\u5982\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n<p>User-agent: *<br \/>\nAllow: \/*?$<br \/>\nDisallow: \/*?<br \/>\nDisallow: \/ *? \u6307\u4ee4\u5c06\u963b\u6b62\u5305\u542b ? \u7684\u6240\u6709\u7f51\u5740 \uff08\u5177\u4f53\u800c\u8a00\uff0c\u5b83\u5c06\u62e6\u622a\u6240\u6709\u4ee5\u60a8\u7684\u57df\u540d\u5f00\u5934\u3001\u540e\u63a5\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u662f\u95ee\u53f7\uff0c\u800c\u540e\u53c8\u662f\u4efb\u610f\u5b57\u7b26\u4e32\u7684\u7f51\u5740\uff09\u3002<\/p>\n<p>Allow: \/*?$ \u6307\u4ee4\u5c06\u5305\u542b\u4ee5 ? \u7ed3\u675f\u7684\u6240\u6709\u7f51\u5740 \uff08\u5177\u4f53\u800c\u8a00\uff0c\u5b83\u5c06\u5141\u8bb8\u5305\u542b\u6240\u6709\u4ee5\u60a8\u7684\u57df\u540d\u5f00\u5934\u3001\u540e\u63a5\u4efb\u610f\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u662f\u95ee\u53f7 (?)\uff0c\u95ee\u53f7\u4e4b\u540e\u6ca1\u6709\u4efb\u4f55\u5b57\u7b26\u7684\u7f51\u5740\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>robots.txt\u653e\u4e8e\u7f51\u7ad9\u6839\u76ee\u5f55\u4e0b\u9762\uff0c\u7528\u6765\u63a7\u5236Google\u7684\u7f51\u7edc\u673a\u5668\u4eba\u4e0d\u6293\u53d6\u4f60\u60f3\u8981\u54ea\u4e9b\u5185\u5bb9\u4e0d\u88ab\u6293\u53d6\u7684\u3002 Di [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-969","post","type-post","status-publish","format-standard","hentry","category-code_related"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=969"}],"version-history":[{"count":2,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/969\/revisions"}],"predecessor-version":[{"id":5231,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/969\/revisions\/5231"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=969"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=969"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}