How do I put a robots.txt/ to block access

  • 1
  • Question
  • Updated 5 years ago
  • Answered
How can I put a robots.txt on my site to block all access to it? I did put lock on it, however, people are pulling up old archives. I went to archives and it says to put robots.txt/ with the address...not working...have no idea what I'm doing ! this is the instructions...I only know how to put an HTML on my site, is that the widget I use...

How to create a /robots.txt file
Where to put it

The short answer: in the top-level directory of your web server.

The longer answer:

When a robot looks for the "/robots.txt" file for URL, it strips the path component from the URL (everything from the first single slash), and puts "/robots.txt" in its place.

For example, for "http://www.example.com/shop/index.html, it will remove the "/shop/index.html", and replace it with "/robots.txt", and will end up with "http://www.example.com/robots.txt".

So, as a web site owner you need to put it in the right place on your web server for that resulting URL to work. Usually that is the same place where you put your web site's main "index.html" welcome page. Where exactly that is, and how to put the file there, depends on your web server software.
Photo of Patti

Patti

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Hello Patti,

There isn't access to the root directory of Yola sites. As such this strategy can't work.
Photo of Patti

Patti

  • 2 Posts
  • 0 Reply Likes
Ok..thank you Gop