Both http://example.com and https://example.com are showing up as duplicate content in the Google results. How do you remove the HTTP version from Google index but keep the HTTPS version using Google Search Console? Whenever I temporarily block http://example.com, it removes both HTTP and HTTPS versions from the index.

  • Did you add the https version as the preferred way of displaying the url? – Yan Gilbert Dec 4 '17 at 18:45
  • @YanGilbert How do you set that in GSC? – MrWhite Dec 4 '17 at 19:49
  • 1
    There is no setting for that in search console. – Stephen Ostermiller Dec 4 '17 at 20:18
  • I'm surprised that both come up. Google now does an excellent job identifying duplicate pages due to HTTPS/HTTP, www/no-www, slash/index.html, etc. I've only seen Google index one or the other of those recently. What search makes them come up as duplicates? – Stephen Ostermiller Dec 4 '17 at 20:21
  • 1
    In Search Console- Site Settings (from the gear icon on the top right). You need to verify all versions of the web property. http/https www/non-www (4 different versions) Once you do that it will let you choose how you would like Google to display the urls. Not saying this will solve the problem, but it is something I would check. – Yan Gilbert Dec 4 '17 at 20:41

There are certain things that you will need to make sure like: check if all the internal as well as external links are pointing to the new HTTPS URL. You must ensure that all rel=canonical tags within your HTML don’t point to the old HTTP version, this will help Google to understand which version of the page should be used to rank.

| improve this answer | |

A permanent redirect (301) from all HTTP versions to HTTPS should help. If you have access to htaccess, the task is fairly easy. In case you use a CMS like WordPress, there are plugins to help you do this. Even otherwise, setting up 301 redirect should be straightforward.

Google after encountering 301 redirects, will slowly start dropping the HTTP versions from the index while retaining the HTTPS versions. I observed this happen for my site when I moved the entire site to HTTPS.

The lines of code in my htaccess is something like this

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
| improve this answer | |

Only two things you need to do:

First, Make sure your default URL is https://example.com, means redirect all versions (http://example.com, http://www.example.com, https://www.example.com) of your domain redirect to your default URL.

Second, I hope you already set up a property with default URL (https://example.com) on search console. Now do Fetch as Google for the Homepage and the URLs of which both http:// and https:// are showing on Google SERP.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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