2

I want stop my beta.example.com being indexed by search engines, because it can generate duplication issue.

Sathiya Kumar V M
  • 2,938
  • 4
  • 22
  • 31
Jigs P
  • 21
  • 1

1 Answers1

3

After trying different methods I came to the conclusion that you can never be really sure if a search engine respects robots.txt or 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 .htaccess / .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:

myusename:al9sjdl98kajdaklsjdalkdj 

(username followed by md5 encrypted password)

tillinberlin
  • 1,479
  • 11
  • 18