Skip to main content

Where should the robots.txt file be located?

The robots.txt file must be located in the site's root directory and accessible at:

javascript
https://site.com/robots.txt

Search engines look for it specifically in the domain root, other locations (for example, in folders or subdomains) are not taken into account.

Short Answer

Interview ready
Premium

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