http homepage and https homepage, which one google prefer?

You may think google prefers https homepage rather than the http homepage. Nowadays, it seems a common sense that https webpage ranks better than http webpage because it is more “secure”. And google, in its official documents, admits https page has slight advantage over http page as to the ranking. However, a misconfiguration of my websites subverts this opinion.

Originally, there was one https website on my server. The site ranks well including its homepage. Of course, all indexed pages are https pages because I did not configure apache to listen on port 80. I did not even open the 80 port in my firewall. Later, I added another http website on the server and I configured apache to listen on port 80 and open port 80 in the firewall. Due to the misconfiguration, when user visits the first website via http(not https), it is 301 redirected to the second site.  I did not realize this until one day I found the content of the indexed homepage of the first website became the homepage of the second website. The original https version of the homepage of the first site is no longer indexed in google serp, although the https homepage always exists and is accessible.  I corrected this problem and used a special virtual host to serve the  http version of the first site. When user tries to visit the http version of the first website, the server will return a 403 forbidden code. I know the effects of 403 code to SEO. Google should remove the ranking of the http version of the website soon.

This accident reminds me that google prefers http version of a website  more than its https version. If both versions coexist, google may only index the http homepage and discard the other.

Posted in tips of hosting