简体   繁体   English

Blogger/Blogspot - 如何修复 Http to Https 重定向 SEO 违规

[英]Blogger/Blogspot - How to fix Http to Https redirect SEO violation

In SEO analysis report of my blog, I found this violation message more than thousand times.在我博客的SEO分析报告中,我发现这个违规信息超过千次。

The link to "http://myblog.blogspot.com/search/label/ASP.Net" has resulted in HTTP redirection to "https://myblog.blogspot.com/search/label/ASP.Net".
Search engines can only pass page rankings and other relevant data through a single redirection hop. Using unnecessary redirects can have a negative impact on page ranking.

I searched on net and I am feeling like to set either custom robot.txt file to disable crawling of http pages or may be I have to set 301 permanent redirect.我在网上搜索,我想设置自定义 robots.txt 文件以禁用对 http 页面的抓取,或者我可能必须设置 301 永久重定向。 Either way can anybody suggest how to do this in blogger/blogspot.无论哪种方式,任何人都可以建议如何在博主/blogspot 中做到这一点。

I checked this question ( Use 301 Redirect In Google Blogger/Blogspot ) seems similar to this, but the solution is quite time consuming as it needs to be fixed for every post.我检查了这个问题( 在 Google Blogger/Blogspot 中使用 301 重定向)似乎与此类似,但该解决方案非常耗时,因为它需要针对每个帖子进行修复。

There is an option present within Blogger settings (Under Settings 🡆 Basic 🡆 HTTPS 🡆 HTTPS redirect) which will allow you to set up 301 Redirects on a sitewide basis. Blogger 设置中有一个选项(在设置 🡆 Basic 🡆 HTTPS 🡆 HTTPS 重定向下)允许您在整个站点范围内设置 301 重定向。

在此处输入图片说明

If you want to prevent the round trip from HTTP to HTTPS without updating the post content for your users (won't work for crawlers), you will need to add the following meta tag in the <head> portion of the template code.如果您想阻止从 HTTP 到 HTTPS 的往返而不更新用户的帖子内容(不适用于爬虫),您需要在模板代码的<head>部分添加以下元标记。

<meta content='upgrade-insecure-requests' http-equiv='Content-Security-Policy' />

In case of a custom domain, you can also set up CloudFlare and use their Always Use HTTPS and Automatic HTTPS Rewrites features to setup 301 redirects.如果是自定义域,您还可以设置 CloudFlare 并使用其始终使用 HTTPS自动 HTTPS 重写功能来设置 301 重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM