在 robots.txt 中...
我想允许目录的索引或主页。
/landing/
我不想在目录中允许任何其他页面。
/landing/page
/landing/anypage
如何做到这一点?
最佳答案
User-agent: *
Allow: /landing/$
Disallow: /landing/
根据 Google 网站管理员的说法,您可能只需要 Allow
指令:
来源:https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt?hl=en#order-of-precedence-for-group-member-records
关于seo - 允许子目录索引但不允许子目录中的其他页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38043199/