<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5">
    <title>网站改成https是否必要？网站教你https怎么做 | 云图网</title>
    <meta name="keywords" content="# 搜索引擎,# 浏览器,GitHub,go,google,https,SEO,Web,服务器,漏洞,网站建设,谷歌">
<meta name="description" content="什么是HTTPS？ HTTPS正在用于通过超文本传输​​协议（HTTP）进行通信，最后以&#8217;S&#8217;代表&#8217;安全&#8217;。采用HTTPS，您可以为用户提供三个关键的保护层： 身份验证可防止“中间人”攻击，并提供与正在使用的确切网站进行通信的保证。 加密通过加密交换的数据来提供隐私。这确…">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.ytso.com/tech/pnotes/262704.html">
<meta property="og:site_name" content="云图网">
<meta property="og:title" content="网站改成https是否必要？网站教你https怎么做">
<meta property="og:image" content="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524114314831.jpg">
<meta property="og:description" content="什么是HTTPS？ HTTPS正在用于通过超文本传输​​协议（HTTP）进行通信，最后以&#8217;S&#8217;代表&#8217;安全&#8217;。采用HTTPS，您可以为用户提供三个关键的保护层： 身份验证可防止“中间人”攻击，并提供与正在使用的确切网站进行通信的保证。 加密通过加密交换的数据来提供隐私。这确…">
<link rel="canonical" href="https://blog.ytso.com/tech/pnotes/262704.html">
<meta name="applicable-device" content="pc,mobile">
<meta http-equiv="Cache-Control" content="no-transform">
<link rel="shortcut icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg">
<link rel='dns-prefetch' href='//cdnjs.cloudflare.com' />
<style id='wp-img-auto-sizes-contain-inline-css' type='text/css'>
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='stylesheet-css' href='https://blog.ytso.com/wp-content/themes/justnews/css/style.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='material-icons-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/material-icons.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='remixicon-css' href='https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.min.css?ver=6.9.4' type='text/css' media='all' />
<link rel='stylesheet' id='font-awesome-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/font-awesome.css?ver=6.21.5' type='text/css' media='all' />
<style id='wp-block-library-inline-css' type='text/css'>
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:69ca08b30f624*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id='classic-theme-styles-inline-css' type='text/css'>
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<link rel='stylesheet' id='wpcom-member-css' href='https://blog.ytso.com/wp-content/plugins/wpcom-member/css/style.css?ver=1.7.19' type='text/css' media='all' />
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script>
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.ytso.com/xmlrpc.php?rsd" />
<meta name='description' content='什么是HTTPS？ HTTPS正在用于通过超文本传输​​协议（HTTP）进行通信，最后以&#8217;S&#8217;代表&#8217;安全&#8217;。采用HTTPS，您可以为用户提供三个关键的保护层： 身份验证可防止“中间人”攻击，并提供与正在使…' />
<meta name='keywords' content='# 搜索引擎,# 浏览器,GitHub,go,google,https,SEO,Web,服务器,漏洞,网站建设,谷歌' />
<style>:root{--theme-color: #08c; --theme-hover: #07c; --logo-height: 32px; --logo-height-mobile: 26px; --menu-item-gap: 28px; --member-login-bg: url('https://blog.ytso.com/loginwall.jpg'); --header-bg-color: #fff; --header-bg-image: none; --theme-border-radius-s: 3px; --theme-border-radius-m: 5px; --theme-border-radius-l: 8px; --theme-border-radius-xl: 12px; --thumb-ratio-default: 480 / 300; --thumb-ratio-post: 480 / 300; --post-video-ratio: 860 / 482;}</style>
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="32x32" />
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="192x192" />
<link rel="apple-touch-icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
<meta name="msapplication-TileImage" content="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
    <!--[if lte IE 11]><script src="https://blog.ytso.com/wp-content/themes/justnews/js/update.js"></script><![endif]-->
</head>
<body class="wp-singular post-template-default single single-post postid-262704 single-format-standard wp-theme-justnews lang-cn el-boxed header-fixed">
<header class="header header-fluid">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-label="menu">
                <span class="icon-bar icon-bar-1"></span>
                <span class="icon-bar icon-bar-2"></span>
                <span class="icon-bar icon-bar-3"></span>
            </button>
                        <div class="logo">
                <a href="https://blog.ytso.com/" rel="home">
                    <img src="https://imgcdn.ytso.com/wp-content/uploads/2021/12/20211207181156143.png" alt="云图网">
                </a>
            </div>
        </div>
        <div class="collapse navbar-collapse mobile-style-0">
            <nav class="primary-menu"><ul id="menu-justnews-footer-menu" class="nav navbar-nav wpcom-adv-menu"><li class="menu-item"><a href="https://blog.ytso.com/category/industrynews">业界资讯</a></li>
<li class="menu-item current-post-ancestor active menu-item-style menu-item-style-1 dropdown"><a target="_blank" href="https://blog.ytso.com/category/tech" class="dropdown-toggle">技术专区</a>
<ul class="dropdown-menu menu-item-wrap menu-item-col-5">
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/cloud">云计算</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/ai">人工智能</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/safety">信息安全</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/bigdata">大数据</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/dev">研发管理</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/webdev">大前端</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/opensource">开源</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/aiops">智能运维</a></li>
	<li class="menu-item current-post-ancestor current-post-parent active"><a href="https://blog.ytso.com/category/tech/pnotes">编程笔记</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/wp">WordPress</a></li>
</ul>
</li>
<li class="menu-item"><a href="https://blog.ytso.com/category/enterprise-strategic-planning">企业战略规划</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/download">下载专区</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/it%e6%b1%9f%e6%b9%96%e5%8f%b2">江湖史</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/notes">随笔记录</a></li>
</ul></nav>            <div class="navbar-action">
                <div class="navbar-search-icon j-navbar-search"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></div><form class="navbar-search" action="https://blog.ytso.com/" method="get" role="search"><div class="navbar-search-inner"><i class="wpcom-icon wi navbar-search-close"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i><input type="text" name="s" class="navbar-search-input" autocomplete="off" maxlength="100" placeholder="输入关键词搜索..." value=""><button class="navbar-search-btn" type="submit" aria-label="搜索"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button></div></form>                    <div id="j-user-wrap">
                        <a class="login" href="https://blog.ytso.com/login">登录</a>
                        <a class="login register" href="https://blog.ytso.com/register">注册</a>
                    </div>
                                            <a class="wpcom-btn btn-primary btn-xs publish" href="https://blog.ytso.com/contribute">
                            <i class="fa fa-edit"></i> 投稿                        </a>
                                </div>
        </div>
    </div><!-- /.container -->
</header>

<div id="wrap">    <div class="wrap container">
        <ol class="breadcrumb" vocab="https://schema.org/" typeof="BreadcrumbList"><li class="home" property="itemListElement" typeof="ListItem"><a href="https://blog.ytso.com" property="item" typeof="WebPage"><span property="name" class="hide">云图网</span>首页</a><meta property="position" content="1"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech" property="item" typeof="WebPage"><span property="name">技术专区</span></a><meta property="position" content="2"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech/pnotes" property="item" typeof="WebPage"><span property="name">编程笔记</span></a><meta property="position" content="3"></li></ol>        <main class="main">
                            <article id="post-262704" class="post-262704 post type-post status-publish format-standard hentry category-pnotes tag-11564 tag-11563 tag-github tag-go tag-google tag-https tag-seo tag-web tag-13058 tag-12788 tag-9006 tag-198 entry">
                    <div class="entry-main">
                                                                        <div class="entry-head">
                            <h1 class="entry-title">网站改成https是否必要？网站教你https怎么做</h1>
                            <div class="entry-info">
                                                                <time class="entry-date published" datetime="2022-05-27T16:37:23+08:00" pubdate>
                                    2022年5月27日 16:37                                </time>
                                <span class="dot">•</span>
                                <a href="https://blog.ytso.com/category/tech/pnotes" rel="category tag">编程笔记</a>                                                            </div>
                        </div>
                        
                                                <div class="entry-content text-indent text-justify">
                            <div id="toc">
<p class="toc-title"><strong>文章目录</strong><span class="toc-controller toc-controller-show">[隐藏]</span></p>
<ul>
<li class="toc-level2"><a href="#toc_1">什么是HTTPS？</a></li>
<li class="toc-level2"><a href="#toc_2">为什么迁移到HTTPS？</a></li>
<li class="toc-level2"><a href="#toc_3">迁移到HTTPS之前</a>
<ul>
<li class="toc-level3"><a href="#toc_4">抓取网站并起草计划</a></li>
<li class="toc-level3"><a href="#toc_5">检查排名</a></li>
</ul>
</li>
<li class="toc-level2"><a href="#toc_6">选择正确的部署选项</a></li>
<li class="toc-level2"><a href="#toc_7">获取HTTPs证书</a></li>
<li class="toc-level2"><a href="#toc_8">部署前的SEO考虑和最佳实践</a>
<ul>
<li class="toc-level3"><a href="#toc_9">防止爬行和索引问题</a></li>
<li class="toc-level3"><a href="#toc_10">摆脱不必要的重定向链</a></li>
</ul>
</li>
<li class="toc-level2"><a href="#toc_11">部署后的最佳实践</a>
<ul>
<li class="toc-level3"><a href="#toc_12">让Google知道你已经移动</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="toc_1">什么是HTTPS？</h2>
<p>HTTPS正在用于通过超文本传输​​协议（HTTP）进行通信，最后以&#8217;S&#8217;代表&#8217;安全&#8217;。采用HTTPS，您可以为用户提供三个关键的保护层：</p>
<ul>
<li><strong>身份验证</strong>可防止“中间人”攻击，并提供与正在使用的确切网站进行通信的保证。</li>
<li><strong>加密</strong>通过加密交换的数据来提供隐私。这确保对话不会被窃听，信息也不会被盗用。</li>
<li><strong>数据完整性</strong>可防止数据在传输过程中被不明显地修改或损坏。</li>
</ul>
<div id="attachment_28824" style="width: 610px" class="wp-caption alignnone"><noscript><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-28824" class="size-full wp-image-28824" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524114314831.jpg" alt="网站建设" width="600" height="337" data-lazy-src="https://www.shejiku.net/wp-content/uploads/2018/05/5d7b9adcbe1c629ec722-4.jpg" /></noscript><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-28824" class="size-full wp-image-28824 j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524114314831.jpg" alt="网站建设" width="600" height="337" data-lazy-src="https://www.shejiku.net/wp-content/uploads/2018/05/5d7b9adcbe1c629ec722-4.jpg" /><noscript><noscript><img decoding="async" aria-describedby="caption-attachment-28824" class="size-full wp-image-28824" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524114314831.jpg" alt="网站建设" width="600" height="337" /></noscript><img decoding="async" aria-describedby="caption-attachment-28824" class="size-full wp-image-28824 j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524114314831.jpg" alt="网站建设" width="600" height="337" /></noscript></p>
<p id="caption-attachment-28824" class="wp-caption-text">网站建设</p>
</div>
<h2 id="toc_2">为什么迁移到HTTPS？</h2>
<p>除了安全是关键优先事项之外，还有几件事值得考虑：</p>
<ul>
<li><strong>私人和安全的</strong>在线体验是用户在访问您的网站时所期望的，用户的信任对于企业来说是真正有价值的资产。</li>
<li><strong>一些很棒的更新，</strong>比如HTTP / 2（你可以真正从中获益，速度更快）仅在某些浏览器中通过HTTPS支持。</li>
<li><strong>排名提升</strong>可能是一个很好的激励措施，因为Google暗示将来会加强HTTPS信号。</li>
</ul>
<p>此时，您可能会怀疑计划迁移。您需要一个深思熟虑的计划，使您的HTTP迁移无痛苦。</p>
<h2 id="toc_3">迁移到HTTPS之前</h2>
<h3 id="toc_4">抓取网站并起草计划</h3>
<p>初始条件可能会有所不同：您可能拥有一个5页的新鲜网站，其中包含一个CMS或一个拥有10年以上变化背景的巨大网站和几个独立单位的迁移（对于我们的团队来说，情况就是如此）。无论哪种方式，要采取的第一步是仔细抓取您的网站。这将帮助您评估该网站的当前状态并可视化其结构。</p>
<p>在此过程中，请考虑您网站每个区域下的所有技术或CMS，并列出需要单独处理的所有单元。此外，列出可能在迁移时遇到的所有事情（这些可能是支付网关，可下载，外部脚本，API和其他）。在开始之前，您应该确定最易受到检查的事情，即迁移后的第一件事情。</p>
<h3 id="toc_5">检查排名</h3>
<p>虽然谷歌计算出这些变化，但你<em>不可避免地会</em>遇到一些排名动荡。没有办法解决这个问题，但是也没有什么可担心的，因为如果一切顺利的话，事情应该很快恢复正常。</p>
<p>然而，为了能够仔细检查影响，并确保它只是一个短期的波动，你需要有一些移民前的历史。在规划交换机时，请务必每周检查一次排名情况，以便全面了解网站通常的位置。</p>
<p>为了避免以后搜索&#8217; <em>为什么我的排名下降</em> &#8216;，您可以做一件更方便的事情：检查您的网站排名的所有关键字，并按他们所属的网站区域对排名页进行分组。这将帮助您通过一目了然地检测麻烦区域来追踪排名后显着下降的原因。</p>
<h2 id="toc_6">选择正确的部署选项</h2>
<p>一旦你有你的网站草案和主要计划，你可以继续选择正确的部署选项。</p>
<ul>
<li>如果你是一个好心人，你可以直接将这些改变部署到生产环境中。通过这种方式，所有更改都将立即提供给用户，但任何被忽视的错误都会随之一起生效。</li>
<li>更谨慎的做法是将更改部署到开发环境，然后在过度测试时将其更改到生产网站。</li>
<li>最昂贵和耗时的选择是设置一个临时环境，以便在将网站与生产网站合并之前，测试网站功能齐全的“镜像”上的更改。</li>
</ul>
<p>您可以根据网站的复杂性和其他特性选择任何选项，但如果潜在的弹出错误不能在一只手的手指上计算，则可能不会后悔选择最后一个选项。</p>
<p>最昂贵和最耗时的选择是设置一个临时环境，以便在将网站与生产网站合并之前，测试网站全功能“镜像”上的更改。您可以根据网站的复杂性和其他特性选择任何选项，但如果可能弹出的潜在错误不能在一只手的手指上计算，则可能不会后悔选择后者。</p>
<h2 id="toc_7">获取HTTPs证书</h2>
<p>要为您的网站启用HTTPS，您需要在服务器上获取并配置<a href="https://www.searchenginejournal.com/type-ssl-certificate-website-need/187863/">所需的SSL / TLS证书</a>。</p>
<p>首先选择一个可信证书提供商（理想情况下，提供技术支持）。然后，请确保选择正确的安全级别：Google建议使用2048位密钥获取证书，或者升级到此证书，以防万一您拥有1024位密钥较弱的证书。</p>
<p>根据您的网站，在单一域（对于单个域），多域（多个知名子域）或通配符证书（许多动态子域）之间做出决定。获得证书后，请确保<a href="https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices" target="_blank" rel="noopener">正确部署并按照最佳做法对其进行配置</a>。</p>
<h2 id="toc_8">部署前的SEO考虑和最佳实践</h2>
<p>一旦证书被部署，配置和测试（<em>并且</em><em>确实</em><em>运行良好</em>），现在是时候将服务器端301重定向到您网站的HTTPS版本，以防止任何人（用户或搜索引擎机器人）着陆从现在开始的HTTP页面。一旦完成迁移，<em>两个</em>版本都不应该有任何页面或资源可用，因为这可能会导致内容重复问题，最终会向搜索引擎发送混淆信号。</p>
<p>重定向实施后，分别列出了需要检查和修复的事项。</p>
<h3 id="toc_9">防止爬行和索引问题</h3>
<p>您希望Google知道您正在迁移到HTTP。所以接下来你应该：</p>
<ul>
<li>修改你的<strong>robots.txt</strong>并确保你没有限制你的HTTPS页面。</li>
<li>检查HTTPS页面是否有任何<strong>不明显的noindex标签。</strong></li>
</ul>
<p>一旦所有东西看起来都是有序的，请仔细检查一下。此时，使用任何允许代表Googlebot抓取的网站审核工具扫描您的网站是明智之举，并且可以像浏览Google一样浏览您的网站。</p>
<h3 id="toc_10">摆脱不必要的重定向链</h3>
<p>您的网站可能已经有一堆重定向了; 当您迁移并实施HTTPS时，有些可能变得没有必要。如果您将<em>www</em>页面重定向到<em>非www</em>，现在另外对<em>https非www，</em>  您可以查看链接的哪个链接可能会被删除以提高速度。</p>
<p>由于过度重定向导致的加载时间过慢可能会导致用户离开您的网站并影响您的排名，因此请不要忽视该步骤。当你在那里时，你也可以检查所有重定向是否导向相关页面。</p>
<h2 id="toc_11">部署后的最佳实践</h2>
<p>恭喜，您的新HTTPS网站上亮起了绿色的锁！现在是时候通过一个基本的质量保证清单：</p>
<ul>
<li><strong>重新抓取</strong>的网站<em>再次</em>，确保所有页面和资源返回<strong>200成功状态码</strong>，并通过HTTPS提供。</li>
<li>回到准备期间形成的<strong>漏洞清单</strong>。仔细测试他们。</li>
</ul>
<h3 id="toc_12">让Google知道你已经移动</h3>
<p>Google将HTTPS迁移视为网站更改的URL移动。所以现在您应该将新的HTTPS属性添加到您的Google Search Console。HTTP和HTTPS分开处理，不共享数据。</p>
<p>接下来，生成一个全新的以HTTPS网址为特征的网站地图，并将其提交给Google。</p>
<p>最后，将其他设置转移到新的属性，例如URL参数列表和拒绝文件。</p>
<div class="entry-readmore"><div class="entry-readmore-btn"></div></div>                                                        <div class="entry-copyright"><p>原创文章，作者：ItWorker，如若转载，请注明出处：https://blog.ytso.com/tech/pnotes/262704.html</p></div>                        </div>

                        <div class="entry-tag"><a href="https://blog.ytso.com/tag/%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e" rel="tag"># 搜索引擎</a><a href="https://blog.ytso.com/tag/%e6%b5%8f%e8%a7%88%e5%99%a8" rel="tag"># 浏览器</a><a href="https://blog.ytso.com/tag/github" rel="tag">GitHub</a><a href="https://blog.ytso.com/tag/go" rel="tag">go</a><a href="https://blog.ytso.com/tag/google" rel="tag">google</a><a href="https://blog.ytso.com/tag/https" rel="tag">https</a><a href="https://blog.ytso.com/tag/seo" rel="tag">SEO</a><a href="https://blog.ytso.com/tag/web" rel="tag">Web</a><a href="https://blog.ytso.com/tag/%e6%9c%8d%e5%8a%a1%e5%99%a8" rel="tag">服务器</a><a href="https://blog.ytso.com/tag/%e6%bc%8f%e6%b4%9e" rel="tag">漏洞</a><a href="https://blog.ytso.com/tag/%e7%bd%91%e7%ab%99%e5%bb%ba%e8%ae%be" rel="tag">网站建设</a><a href="https://blog.ytso.com/tag/%e8%b0%b7%e6%ad%8c" rel="tag">谷歌</a></div>
                        <div class="entry-action">
                            <div class="btn-zan" data-id="262704"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div>
                                                    </div>

                        <div class="entry-bar">
                            <div class="entry-bar-inner">
                                                                <div class="entry-bar-info entry-bar-info2">
                                    <div class="info-item meta">
                                                                                    <a class="meta-item j-heart" href="javascript:;" data-id="262704"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a>                                        <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a>                                                                            </div>
                                    <div class="info-item share">
                                                                                    <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="262704" data-qrcode="https://blog.ytso.com/tech/pnotes/262704.html">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报                                            </a>
                                                                                    <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item douban" data-share="douban" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-douban"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item linkedin" data-share="linkedin" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-linkedin"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item facebook" data-share="facebook" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-facebook"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item twitter" data-share="twitter" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-twitter"></use></svg></i>                                            </a>
                                                                            </div>
                                    <div class="info-item act">
                                        <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                                            <div class="entry-page">
                    <div class="entry-page-prev j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/05/24/20220524113754968.png">
                <a href="<error>
    <code>wp_die</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;h1&gt;Error establishing a Redis connection&lt;/h1&gt;
&lt;p&gt;To disable Redis, delete the &lt;code&gt;object-cache.php&lt;/code&gt; file in the &lt;code&gt;/wp-content/&lt;/code&gt; directory.&lt;/p&gt;
]]></message>
    <data>
        <status>500</status>
    </data>
</error>
<!--
Performance optimized by Redis Object Cache. Learn more: https://wprediscache.com

Retrieved 1803 objects (276 KB) from Redis using Predis (v2.4.0).
-->
