Skip to main content

What does the Allow directive do?

The Allow directive in the robots.txt file lets a search bot crawl specific pages or files inside a directory that is otherwise blocked by a Disallow rule. It's used as an exception to the block.

For example:

javascript
User-agent: * Disallow: /private/ Allow: /private/info.html

Here the bot cannot crawl the /private/ folder, but can index the /private/info.html page.

Key points:

  • Allow is used only in combination with Disallow, to refine access.
  • When rules conflict, search engines choose the most specific one (the more precise path).
  • Allow helps keep important pages accessible without opening the whole section.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.