Skip to main content

Glossary

What Is robots.txt

robots.txt is a file that tells search engine bots which parts of your site they can and cannot access. Learn what it does and why it matters.

Definition

robots.txt is a small text file that sits at the root of your website and gives instructions to search engine bots about which pages or sections of your site they are allowed to crawl. It acts as a set of ground rules: you can use it to block bots from accessing areas that are not useful in search results, such as admin pages, internal search results, or staging content. robots.txt is a request, not a command. Well-behaved bots like Google's will follow the rules, but malicious bots may ignore them entirely.

Why It Matters

Without a robots.txt file, search engine bots will attempt to crawl everything on your site, which may include pages you do not want indexed. This can waste crawl budget on unimportant pages, expose duplicate content that confuses search engines, or leak internal tools into search results. A well-configured robots.txt file keeps bots focused on the pages that matter for your visibility. It is also a core part of technical SEO, and getting it wrong has real consequences: a single incorrect line can accidentally block your entire site from appearing in Google. It is a small file with outsized consequences, so it needs to be set up correctly and reviewed periodically.

Example

A business discovers that Google has indexed their WordPress login page, their internal site search results, and several draft landing pages. None of these should be visible in search results. They update their robots.txt file to disallow bots from crawling the login directory, the internal search path, and the draft folder. Within a few weeks, those pages disappear from search results, and Google’s crawlers focus their time on the real content pages instead.

For more technical terms explained in plain English, see the glossary.

Portrait of Alexander De Sousa, founder of Digital Royalty
Founder-led
“I’ve put everything I know into how this company works — the standards, the method, the care on every project. It runs through the whole team, and I hold us all to it.”

Alexander De Sousa · Founder LinkedIn

Featured on BBC Radio Solent

Get started

Tell us what you need

A few quick questions, then a straight answer from a real person — usually within a few hours.

Tell us what you're working on

Whether it's a new site, a platform, or a process that shouldn't be manual any more — we'll tell you honestly if we can help.