skip to Main Content

In robots.txt…

I want to allow the index or homepage of the directory.

/landing/

I don’t want to allow any other pages within the directory.

/landing/page  
/landing/anypage

How can this be done?

2

Answers


  1. disallow: /landing/* should work.

    Login or Signup to reply.
  2. User-agent: *
    Allow: /landing/$
    Disallow: /landing/
    

    According to Google Webmasters, you may only need the Allow directive:

    enter image description here
    source: https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt?hl=en#order-of-precedence-for-group-member-records

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search