Skip to content

What is Robots Txt?

If you have your own website, are a digital marketing professional, or are just someone trying to learn a little bit more about how to create visibility online, then you may be trying to better understand the world of SEO. It’s likely that if you’re in the initial stages, you’ve already learned about some fundamentals…
Reading Time: 2 minutes

If you have your own website, are a digital marketing professional, or are just someone trying to learn a little bit more about how to create visibility online, then you may be trying to better understand the world of SEO. It’s likely that if you’re in the initial stages, you’ve already learned about some fundamentals such as keyword research and optimising your site for the web. In addition to this, you may also have covered the topic of search engines and how they index your content.  In the process, perhaps you’ve recently come across the phrase ‘robots.txt’ and are wondering what exactly it is. On that note, this article is going to highlight what robots.txt is all about.

[siteorigin_widget class=”SiteOrigin_Widget_Image_Widget”][/siteorigin_widget]

What is Robots txt?

For those who aren’t already aware, robots txt is a text file that you can put on your website to tell search robots the pages that you don’t want them to visit during their web crawl. Generally, search engines obey what you tell them not to do, so it is almost like putting a ‘do not enter’ sign on those specific pages. You should note, however, that robots.txt doesn’t prevent search engines from crawling your site, so if you have information that you really don’t want anyone seeing, it’s best to keep it offline and on a separate machine.

Why Do You Need it?

You may be wondering why you wouldn’t want search robots visiting some of your pages since it helps improve your ranking in search engines. However, there are a few valid reasons why you wouldn’t want them to. Some of them would probably include:

  • To avoid duplicate content penalties if you have two versions of a page (e., one for print and one for browser viewing).
  • If you have sensitive data you don’t want everyone seeing.
  • Wanting to save bandwidth by omitting images, stylesheets, and javascript from indexing.

Where Does it Go?

As well as learning about robot.txt, you’re probably here because you want to know how to use it for your personal site as well. Firstly, you should know that robot.txt should always go in the main directory. If you make the mistake of putting them somewhere else, search engines won’t be able to find it and will end up indexing your entire site which is exactly what you’re trying to avoid. If you want to know how to write robots txt, then there are many support pages, such as Google, that will allow you to write or edit any robots text file for your site.

Things to Avoid

When adding a robots.txt file to your site, it is important that you do so carefully, as they often have traps. One thing in particular to avoid is allowing different search engines access to different directories as this can create problems. Below you will find some specific mistakes to try and avoid when it comes to robot.txt.

  • Contradicting directives.
  • Misspelled user agents.
  • Missing colons after user-agent and disallow.

It is worth noting that there are tools available to help with typos as trying to find them manually can be quite tricky, such as the Robots.txt Validator tool.

Robots.txt is a great way to prevent all of your pages from becoming visible on the web. This may give you peace of mind knowing that on the internet, you still have access to a level of privacy. However, as mentioned above, if you have extremely sensitive information, keeping it off the web entirely may be a better alternative.

Simon Brisk, Co-Founder and Commercial Director
View all Downloads

Downloads

download

The Ultimate Guide To Selling Products Online

We’re going to take a look at how you can turn your eCommerce dream into a reality.

Download
An e-book cover image titled 'Core Web Vitals', shows a person's hands typing on a laptop with analytics displayed.

2022 Core Web Vitals Checklist

Google's Core Web Vitals reports how a page performs, and here's our checklist to improving page experience this 2022!

Download
A blue section and the text "The Millionaire Guide On SEO." The right side is filled with scattered U.S. one-dollar bills.
View the Blog

You may also be interested in...

How to Build a Multi-Layered Link Building Strategy That Works

Some backlinks can help a key service page gain authority, while others help to strengthen…

Managed SEO vs Buying Individual SEO Services: Which Is Right for You?

SEO can be complicated. It’s constantly changing and is not a one-and-done job. That’s something…

How Can Brands Compete in ChatGPT Without Paying for Ads?

AI has become part of how people research and look for products, as well as…

What Does a White Label SEO Partner Actually Handle?

Growing an SEO agency takes a lot of hard work. You've got to keep up…

Google August 2026 Spam Update Has Finished Rolling Out: What It Means

Google announced it was rolling out a further spam update on August 18, 2026. It…

Why Topic Association Is the Next Frontier of AI SEO

Instead of scrolling through pages and pages of endless search results, more people are now…

Why Editorial Coverage Is Now Essential for Brand Authority

When your target customer heads to Google to search for a product or service, or…

How Community Mentions Help Get Your Brand Featured in ChatGPT

Artificial intelligence (AI) is changing the way that people are searching for information. Tools like…

View all Guides

Online Guides

AI SEO: What It Actually Means and How to Do It
View guide
LLM SEO: The Complete Guide to Large Language Model Optimisation
View guide
How to Rank in AI Overviews: The Complete Guide to AI Overviews Optimisation
View guide
GEO vs SEO: The Complete Guide to Generative Engine Optimization
View guide
The Ultimate AI SEO Service Guide
View guide
The Ultimate On-Page SEO Service Guide
View guide
SaaS SEO & AI Search Strategy Guide
View guide
Ultimate SEO & AI Search Strategy Guide for Franchise
View guide
Back To Top