: User-agent line needed in robots.txt? I'm about to deploy a website for testing and I want to let all the indexing bots to not index my site during this phase. According to Google Webmasters
I'm about to deploy a website for testing and I want to let all the indexing bots to not index my site during this phase.
According to Google Webmasters Help section apparently you only need the following in your robots.txt file:
Disallow: /
But according to www.robotstxt.org/faq/prevent.html and other sources you have to write it like this:
User-agent: *
Disallow: /
I'm afraid that the bots still will index my site if I leave the User-agent: * part out.
So which is the proper way to do it?
More posts by @Carla537
2 Comments
Sorted by latest first Latest Oldest Best
The original robots.txt specification is www.robotstxt.org/orig.html, where it says:
The record starts with one or more User-agent lines […]
So yes, User-agent is required.
As far as I know and as far as I have search for it, there is no robots.txt documentation saying you can drop the user-agent line. I would not rely on this.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.