Thursday, April 5, 2012

Steps to follow if website oppens with both https and http


Https Pages Getting Crawled: Google is crawling our Https pages causing problems like duplicate content…


Solution:

Create 2 robots files and upload them in root folder of the website:

1)      http://www.website.com/robots.txt

With code:

User-agent: *
Allow: /

2)      http://www.website.com/robots_ssl.txt

With Code

User-agent: Googlebot
Disallow: /

User-agent: *
Disallow: /

And apply the following code in the .htaccess file of the website:

RewriteEngine on
Options +FollowSymlinks
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^robots.txt$ robots_ssl.txt

This will disallow Google from crawling our https pages.

3 comments:

  1. Wow...awesome blog for "On page SEO".
    i liked this information...priyanka you give such a great facts about crawling and 301 redirect.
    i come again here for enhance my knowledge.
    Thanks Priyanka...:)

    ReplyDelete