Search The Hostwinds Guides Knowledge Base

What Is The Robots.txt File?

Share:

When you create your site, you will most likely want it to be on Google or other search engines. Luckily though, they have their own bots or “crawlers” that scour the internet to index sites. These bots can be controlled in how they interact with your site through a text file. This would be the robots.txt file. This file contains rules that the bots visiting your site are asked to follow. This can generally be a good thing, but can also be a bad thing for your rating if setup incorrectly.

 

What Does A Robots.txt File Look Like?

Here are a couple different examples of what this file could look like for you.

Allow All Bots Full Access

Block All Access For Bots

Those are just a couple very general templates for the robots.txt file. You can use it to block access to a single folder, or even just a single file if wanted. Each entry within the robots.txt file will have a User-agent field with something next to it. The asterisk indicates a wildcard, where it would apply to all. If you want to set it for a specific bot, you would put this in this field. Any lines after that will apply to that user agent until a new one is specified. For example, in the file below, for Google it would block the /tmp folder on the site, but for all other bots all folders would be allowed (including the /tmp folder).
As you can see, this can be used to prevent bots from indexing private files, or even unnecessary directories. Though memorizing the bots that exist on the internet there are various resources available to find those out.

There are many things that the robots.txt can do to affect the site’s crawlers, but preventing access is the most common. Other options include the crawl-delay option. This option can be used to make the bot delay between crawling the pages on the site. More about what can be done with the robots.txt file can be found on this organizations site here. They even have a complete list of the bots that are known to them available here.

 

If you should have any questions or would like assistance, do feel free to contact us through Live Chat, on our Phones, or by submitting a ticket with our Technical Support team.


Share:

Leave a Reply

Your email address will not be published. Required fields are marked *