Portal Home > Knowledgebase > Articles Database > Redirecting https:// to http://www. using mod_rewrite


Redirecting https:// to http://www. using mod_rewrite




Posted by zomex, 07-02-2010, 10:14 AM
Hello everyone, After a few days my website is showing up in Google. The problem is that some of my pages are indexed as https:// and others as http:// I would like all of my pages to be indexed as http:// (apart from checkout pages etc) so I need to fix my .htaccess file. Does anyone know the correct code? At the moment my website redirects from www. to http://www. but not from https:// Here is my current code: Thanks everyone, Jack

Posted by hamdusa, 07-02-2010, 11:55 AM
There is a quick solution. Use rel="canonical" on all https pages that you want google not to index (and instead index the alternative http pages even if google bot hasnt yet reached your that http page). For details: http://www.google.com/support/webmas...&answer=139394 http://www.seo-muscle.com/canonical-link-tag/ Hope it helps.

Posted by Korvan, 07-02-2010, 03:37 PM
And setup a proper robots.txt. Not all search engines will obey the canonical link tag, some look for a robots.txt to tell them what they should and should not index. For example: http://tools.seobook.com/robots-txt/ It's usually a good idea to take a multi directional approach.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
affilates (Views: 466)
WHM adding a package (Views: 442)
Above net reseller (Views: 470)