I want stop my
beta.example.com being indexed by search engines, because it can generate duplication issue.
After trying different methods I came to the conclusion that you can never be really sure if a search engine respects
no-index or anything the like.
So if you really want to be sure your test site is not indexed, I's recommend using password protection through a
.htpasswd file combi similar to the following code snippet:
AuthType Basic AuthName "Password Protected Area" AuthUserFile /path/to/.htpasswd Require valid-user
The .htpasswd file should then contain something like this:
(username followed by md5 encrypted password)