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