大网数据广告活动
网站运营与故障问答

After redirecting site to HTTPS Google Search Console index status dropping for HTTP but staying at 0 for HTTPS

· 52CE 我爱测

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://exa…

问题原文

原帖链接 · Abdulla · CC BY-SA 3.0

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]

已采纳解答

原帖链接 · TopQnA · CC BY-SA 3.0

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]

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2017-06-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。