Deny https from search engines indexing
Well, if you have such problem, let’s do the following:
- Create two files:
- robots.txt:
User-agent: *
Allow: / - robots-https.txt:
User-agent: *
Disallow: /
- robots.txt:
- Now write in your .htaccess this:
RewriteEngine on
RewriteCond %{HTTPS} on
RewriteRule ^robots\.txt$ robots-https.txt
That’s all
Have a nice day.
Tags: SEO, Apache, apache, htaccess, search engines, seo, server, unix