1

My home page is set to Google and Google adds ?gws_rd=ssl to it. When I type search term form my site into search box Google returns bunch of indexes (different pages within my site) that starts with HTTPS. Obviously when user clicks on any of those it will get disturbing warning that site is not secure.

Now when my home page is set to https://google.com and I type my search terms into search box Google returns proper results.

My site has about 20 pages and all of them are simple HTML pages:

All of them contain a href to each others using relative path.

Now one my pages links to https://othersite.example.com and it is references trough the other 20 pages using absolute path.

What should I do to solve this search results. Should I use canonical in the head of the document for each of the 20 pages?

By using Google Search https... I learned that couple Facebook pages (posts) refer to my site wrongly by using HTTPS instead of HTTP. Could these couple links referencing HTTPS be the cause of this?

2 Answers 2

1

Could these couple links referencing HTTPS be the cause of this?
The answer is yes

This may not be the only reason why your website is indexed with https and not http. For example maybe your sitemap contain forgotten https links, or maybe there are some internal links with https.

How to fix this
Make a quick check so you replace any forgotten internal https links with http, check your sitemap files and add a 301 redirection from https to http to all urls.

After you add the 301 redirection, everyone that visits your website using the https will be redirected to http.

Because of 301 (permanent redirection), Google will remove the https links and replace them with http links. Please note that this may take some days or more, as Googlebot has to recrawl your website a couple of times (after you have add the 301 redirection), in order to change the links.

How to add 301 redirecion
You can add the 301 redirection header either in code or on webserver's configuration.

6
  • 1
    I would not try to prevent users from accessing the https site with redirection. A canonical meta tag would point search engines in the right direction without preventing users from accessing the site securely. Commented Jun 18, 2014 at 11:38
  • You could make the case for redirecting to the secure site. Google has been talking about rankings boosts for sites that use https Commented Jun 18, 2014 at 11:39
  • 2
    A canonical meta tag is not a force statement. Googlebot may follow it or not, based on which version it believes is the best. If the website has a lot of links on the https, but the webmaster wants the http, a canonical meta tag may not work. But a 301 redirection will work. Https maybe better, but not if you have a self signed certificate. If you dont want https dont use it. Close the port or make 301 redirection.
    – krokola
    Commented Jun 18, 2014 at 12:16
  • How would i find what is causing this? Why is google indexing pages as https when all pages should be http
    – Stribor50
    Commented Jun 18, 2014 at 21:33
  • You said that there are links to your website using https. You cannot delete these links. So if you want only http links, you have to make the 301 redirection from https to http and then Google will index your pages for http.
    – krokola
    Commented Jun 18, 2014 at 21:39
1

Google recommends you use canonical URLs for content

These two URLs are different and in the absence of any information, Google will make a best guess as to the canonical version.

http://www.domain.com

and

https://www.domain.com

Set HTTP as The Canonical URL

Since Google has already indexed pages as HTTPS, I recommend you use a 301 redirect for all HTTPS pages.

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{SERVER_PORT} !^80
RewriteRule ^(.*) http://www.domain.com/ [R=301,L]

Replace www.domain.com with your canonical domain name.

If placed in the top level directory of your site, this will make your entire site HTTP only. If you have directories that require HTTPS, then you will need a more complicated ruleset to exempt those directories from the redirect above.

For example, you may have contact forms that need to be HTTPS. In this case you would exempt them from the rules above and then add rules to force them to be HTTPS.

Self-Signed Certificates

I recommend that you replace the self-signed SSL certificate with a paid one. It may take some time for Google to update their links. If you do not do this, then site visitors will get an SSL warning message in their browsers.

If you purchase a certificate, then they will not get a warning and the redirect code will send them to the non-HTTPS version of the site.

Relative Paths

With relative paths, once a URL is loaded with HTTPS, then all other links will also be HTTPS. This can be highly problematic for bots, site map generators and other tools.

So you should not only choose between a canonical domain (www.domain.com vs. domain.com) but also if your site should be exclusively HTTP or HTTPS.

4
  • I added canonical link to each of my pages. All of the pages are http and only one link on those pages links to https pages. My http is mydomain.something.com and that one link on those pages links to myotherdomain.something.com. There is one facebook post that doesnt belong to me that is referencing one of my http pages using https. I am not sure if this is causing google to index pages using https.
    – Stribor50
    Commented Jun 18, 2014 at 19:42
  • 1
    Anybody can link to your page with HTTPS. If Google sees that link, it may attempt to crawl it and index it. The canonical link is simply a clue to the search engines -- it does not influence browsers. This is why I recommend rewrite rules since they will force your visitors onto the preferred URLs and help reduce the chance they link to or bookmark incorrect versions. Commented Jun 18, 2014 at 20:11
  • How do i find if there are forgotten https links in each oh my pages? Would i do this manually just by looking?each oh my pages has one https link that links to external site. I need to give clue to search engine because search engine is the problem. When someone search for my site google returns https links instead of http
    – Stribor50
    Commented Jun 18, 2014 at 21:06
  • You can use a link crawler. I use Xenu's link sleuth. It can help you find hard coded https links. But even if there are hard coded links, implementing the redirects will help fix the issue with the search engines as it will forcibly redirect from HTTPS to HTTP for any link. Commented Jun 19, 2014 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.