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

Should I redirect 301 sitemap.xml from http to https after SSL switch?

· 52CE 我爱测

Specific to sitemap.xml, should I 301 redirect http://example.com/sitemap.xml to https://example.com/sitemap.xml ? I switched 2 weeks ago to ssl (from http to https) and scoured this site to make sure I did things correctly. Howe…

问题原文

原帖链接 · Dave Fes · CC BY-SA 3.0

Specific to sitemap.xml, should I 301 redirect

http://example.com/sitemap.xml to https://example.com/sitemap.xml? I switched 2 weeks ago to ssl (from http to https) and scoured this site to make sure I did things correctly. However, I only see index drops in my Google webmaster account. Nothing improving! So I'm thinking maybe this is a reason?

I thought of one more question as well, should all URLs in both sitemap files point to https, or should we leave the non SSL one point to non SSL URLs, and simply 301 redirect those URLs when users land on them?

已采纳解答

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

Existing Http Sitemap:

This sitemap should continue to exist for time all your search results are crawled as https and even if this also redirects to https://www.example.com/sitemap.xml, then also it should contain all http links

Reason being : the crawler when try to crawl this sitemap will crawl all existing urls and get an indication that these all have been permanently moved to https. It will update its indexes for old urls and will pass authority of the old links to new https links. If you don't add these, then crawler will get this indication only when it try to check for old http urls and will then take more time to reflect and might hurt your existing rankings a bit. The above mentioned reason lower that effect

New sitemap for https :

Https becomes altogether a new property for the crawler. Its better to create a new link for this https sitemap like https://www.example.com/sitemap-new.xml or whatever you want to create. You can update this / submit this via webmaster.

Place all your https links here. Crawler will start crawling links from here and getting an indication of old links migration from http sitemap.

This ideally takes around 20-30 days based on the crawler visit frequency on your site, for almost all links to index as https. After that you can remove your old sitemap if you want.

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

资料来源与适用范围

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

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

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