Robot.txt允许在域中指定URL

Dav*_*son 2 robots.txt

我想只允许主URL(域)http://domain/about和其他URL搜索谷歌不可见.示例我有如下链接:

http://example.com
http://example.com/about
http://example.com/other1
http://example.com/other2
http://example.com/other3
http://example.com/other4
http://example.com/other5
http://example.com/other6
and more URL. 
Run Code Online (Sandbox Code Playgroud)

我的问题是robot.txt的内容,我想只允许http://example.comhttp://example.com/about,我的网站使用wordpress.

谢谢.

Jim*_*hel 5

你想要的是:

User-agent: *
Allow: /$
Allow: /about
Disallow: /
Run Code Online (Sandbox Code Playgroud)

$指示URL字符串必须结束.所以它不允许,例如,/example.com/foo.