Tuesday, February 25, 2020

Prevent Search Engine Indexing through .htaccess File

Copy and paste the above code in the .htaccess file to prevent search engine indexing.

# Prevent Search Engine Indexing
SetEnvIf Host ^www.yourwebsite.com INDEX
Header set X-Robots-Tag "noindex, nofollow" env=!INDEX

If you don’t have .htaccess file in your web server, create it and add the above mentioned code.

No comments:

Post a Comment