1

robots.txt の disallow ステートメントの後に allow all ステートメントを追加する必要がありますか? それとも、bot は disallow としてマークされていないものはすべてクロールできると想定していますか?

例:

User-Agent: *

Disallow: /folder1/
Disallow: /folder2/
Disallow: /folder3/
Disallow: /file1.php
Disallow: /file2.php

Allow: /

Sitemap: http://www.example.co.uk/sitemap.xml

また

User-Agent: *

Disallow: /folder1/
Disallow: /folder2/
Disallow: /folder3/
Disallow: /file1.php
Disallow: /file2.php

Sitemap: http://www.example.co.uk/sitemap.xml
4

1 に答える 1

0

You do not need to explicitly allow if your intent is to permit spiders to find everything except those items explicitly disallowed.

The disallow rules are there for the spider to determine whether something it has found should not be indexed - if there's no match in these rules for the address the spider is currently looking at, it gets indexed.

Here is a reasonably straightforward example page.

于 2013-04-15T11:11:42.447 に答える