What does robots.txt mean – and what it doesn't mean

A robots.txt file is a simple text file that tells search engines and bots what parts of the site they are allowed to index. But what does it really mean in web scraping? Is compliance with it mandatory? This guide explains the meaning and limitations of robots.txt.

What is robots.txt?

Robots.txt is a text file located at the base of the website: https://example.com/robots.txt. It contains rules on what bots can and can't do.

Example of a robots.txt file:

User-agent: *
Disallow: /admin/
Disallow: /private/
Allow: /public/

User-agent: Googlebot
Allow: /

Sitemap: https://example.com/sitemap.xml

In this example:

  • User-agent: * - applies to all bots
  • Disallow: /admin/ - bots are not allowed to index the /admin/ folder
  • Allow: /public/ - /public/ is allowed
  • Sitemap - indicates the location of the side map

What does robots.txt mean

1. It is a technical guide for search engines

Robots.txt was originally designed for search engines (Google, Bing, etc.) to tell which pages they can index. It is respected by bots from reputable search engines.

2. It is public and easy to read

Anyone can read the robots.txt file by typing https://sivusto.fi/robots.txt browser address field. It's not a secret – On the contrary, it publicly tells you what the site owner wants.

3. It is a sign of good practice

If robots.txt denies a certain path, respecting it shows that you act responsibly and respect the wishes of the site owner.

What robots.txt doesn't mean

1. It is not legally binding

Robots.txt is neither law nor contract. Breaking it does not automatically make web scraping illegal. Terms of Use are legally stronger – if they prohibit scraping, compliance with or violation of robots.txt will not change it.

2. It does not prevent access technically

Robots.txt is not a security lock. It's a "don't come here" sign, not a door. The bot can technically override it, but that doesn't mean it's a good idea.

3. It does not replace the Terms of Use

Even if robots.txt allows everything, the site's terms of use may still prohibit scraping. Terms of use are more important legally.

Should robots.txt be followed?

Technically: You don't have to.
Ethically and practically: Yes, it is.

Reasons to respect robots.txt:

  • ✅ Demonstrate that you are acting responsibly
  • ✅ Reduces the risk of being blocked
  • ✅ Can confirm compliance with the Terms of Use if they refer to robots.txt
  • ✅ Avoid unnecessary load on parts of the site that are not intended for public use

What to do if robots.txt denies the data you want?

  1. Check if the API is available: Many sites have an official interface that you can use
  2. Ask permission: Contact the site owner for permission to collect data
  3. Find an alternative source: The same information may be available elsewhere
  4. Assess the risk: If you decide to proceed, understand the risks (blocking, possible legal consequences)

Summary

Robots.txt is a technical instruction, not a legal obstacle. It tells you what the site owner wants, but doesn't force it. Responsible scraping respects robots.txt as part of a broader ethical and legal review that also includes terms of use, copyright, and data protection.

Related reading

Need help with web scraping?

We help to assess the feasibility, legality and risks of a project. We carry out scraping responsibly and with regard to the terms of use.

Get in touch

What would you like to improve in your business?

Learn about the content of the related service and Tell us about your business need.