Can we put robot.txt into the header section ?

  • 1
  • Question
  • Updated 6 years ago
  • Answered
Using Silver is it allowable to create a robots.txt file in the site custom site tracking code area?
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes

Posted 6 years ago

  • 1
Photo of Stefan

Stefan, Official Rep

  • 4448 Posts
  • 190 Reply Likes
Hello Gop

As a Yola Silver customer, you can edit the tracking code area of your site. It is not recommendable to put there anything else than the tracking code you get from Google because you can easily break your whole site if you add incorrect code.

Robot.txt files serve to exclude certain content of your website from being indexed by the search engines. Is there a special reason why you want to do this?

The best way to go for at the moment is to password-protect the relevant pages or your whole site: Adding Password Protection.
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Thanks Stefan,

Yes there is a reason. Developing a site for a trial using real data and don't want site to be discovered for indexing.

Password protection I can't see would be appropriate over-all.

I could check the stability of a site with this added as an extra test site so thank you for the caution and back to the question: Can I place the robots.txt there? :)