2

I moved my HTTP site to HTTPS last month. Earlier I had a search console property for http://www.example.com. Now I created a new property for https://www.example.com (also created property for http://example.com and https://example.com, just to see what it shows).

But the Google index status is showing 0 for my https://www.example.com. Why is that so? The index for the previous property is still showing (though slowly decreasing). Does Google consider my site as 'not adding any value' since there is already an HTTP version? Should I remove other three properties?

I am working on Magento site. It provides settings to use secure URL and I have done that. In addition I have added redirect to HTTPS in .htaccess file.

My robots.txt file just contains this one line:

User-agent: *

The number of pages indexed in sitemap is same in HTTPS and HTTP.

Edit :

.htaccess file :

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.whitesouq.com/$1 [R=301,L]

# All explanations you could find in .htaccess.sample file
DirectoryIndex index.php

RewriteCond %{REQUEST_URI} ^/(index.php/)?admin/ [NC]
RewriteCond %{REMOTE_ADDR} !^124.40.244.18
RewriteRule ^(.*)$ https://%{HTTP_HOST}/ [R=302,L]
  • Where have you implemented the non-www to www redirect? (If you are using Magento, then presumably your .htaccess file contains much more than what you have posted?) – MrWhite Jun 16 '17 at 21:52
  • @user82217,I have too much code in my .htaccess file, I have edited the question with code I think relevent with redirects. I added the code as per the answer given by user-TopQnA to this question.As newbie, not much aware of what it does. Does that redirect non-www to www? – Abdulla Jun 17 '17 at 6:25
  • "The number of pages indexed in sitemap is same in HTTPS and HTTP." - so GSC is reporting indexed pages for the HTTPS property? Presumably your HTTPS sitemap contains just your HTTPS URLs? Which version of the URL(s) appear in the SERPs? (As Stephen mentioned in comments, the GSC reports are sometimes out of date.) The code example by TopQnA is intended to be instead of your existing redirect(s), not in addition to (in your case that would seem to only add code-bloat, it shouldn't break anything though). – MrWhite Jun 17 '17 at 8:33
  • 1
    @user82217 site:example.com return both https and non https pages. So google is indexing my pages,right? my sitemap www.whitesouq.com/sitemap.xml is automatically generated by magento framework. – Abdulla Jun 17 '17 at 9:54
  • Yes, Google is indexing your pages under HTTPS. In fact, you currently appear to have many more HTTPS pages indexed than HTTP pages (129 HTTPS vs 59 HTTP ... 188 total). Using site:www.example.com inurl:https. – MrWhite Jun 17 '17 at 14:43
3

What you have done in search console looks fine.

The only thing i would say is when you redirected from http://www to https://www make sure the http to https redirect response is 301.

Also, make sure all other version of URLs (http://, https://, http://www.) redirects to preferred URL (https://www.) and the server response should be 301.

Once this is done, you don't need to anything else and in search console just look at your preferred URL property.

.htaccess code to directed to: https://www.example.com.au in Magento:

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]


#RewriteEngine on

#RewriteCond %{SERVER_PORT} 80 
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  • 2
    I'd just add that the search console indexing numbers are often unreliable or updated infrequently. Having multiple versions registered in search console never negatively effects your site. – Stephen Ostermiller Jun 16 '17 at 14:01
  • @TopqnA ,Thanks for the reply. http:// and www gives server response as 301,but example.com gives response as 302, is that a problem? (edited the question with .htaccess file) – Abdulla Jun 16 '17 at 16:57
  • 1
    I don't suspect example.com (http:// example.com) redirect response 302 as a problem because your original URL was www But i would still recommend all other should have 302 response. I have amended the answer and you may like to try above code. – TopQnA Jun 17 '17 at 2:07
  • @TopQnA, I have Edited the .htaccess file with the codes you have given. As a newbie, i am not much aware of what it does, but hopes it works good for me. Will it redirect https non-www to https www? And should I replace %{HTTP_HOST} with example.com? – Abdulla Jun 17 '17 at 6:29
  • Just test other URLs and see the redirect and server response. Make sure you check the outcome. – TopQnA Jun 17 '17 at 7:46

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.