I want to block http urls from indexing ,I want https urls only be indexed by googlebots,
I have tried this code in htaccess file but its not working[blocking
#blocking http urls from indexing
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^robots.txt$ robots-deny-all.txt [L]
I wrote this code inside robots-deny-all.txt
User-agent: *
Disallow: /
appreciate your help
only you have to wait for one week to see result , the code works well
in case you wanted to block https replace 80 by 443