2

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.

9
  • Did you add the https version as the preferred way of displaying the url? Commented Dec 4, 2017 at 18:45
  • @YanGilbert How do you set that in GSC?
    – MrWhite
    Commented Dec 4, 2017 at 19:49
  • 1
    There is no setting for that in search console. Commented Dec 4, 2017 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? Commented Dec 4, 2017 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. Commented Dec 4, 2017 at 20:41

3 Answers 3

2

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.

2

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]
</IfModule>
1

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.

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.