Forum Moderators: goodroi
[example.com...]
[example.com...]
http://www.example.com
http://www.example.com/index.aspx
I am on a IIS server. Please give me a proper robots.txt code which I can add to the existing robots.txt file.
I need to block bots from indexing the https url of the homepage and again redirect all aliases to http://www.example.com
Thanks
good luck
create a second robots.txt file, robots_ssl.txt and add entries to it to block all content.
Then add the following linez to your .htaccess file ( in the root of webhosting).
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt
If you don’t have an .htaccess file, create a new one – or ISAPI_Rewrite on Windows ( as .htaccess is for apache server you must be sure with the Server) be sure to put these 2 lines at the top of it:
Options +FollowSymLinks
RewriteEngine on