【问题标题】:Unable to Google Change Of Address from Old Site to New Site无法通过 Google 将地址从旧站点更改为新站点
【发布时间】:2020-02-06 07:54:15
【问题描述】:

我已经设置了从旧站点到新站点的重定向,但是当我尝试更改地址时,Google 给出了错误。

这是在我的 .htaccess 中

Redirect 301 https://www.thebackcountrytrail.com https://highaltitudebrands.com
Redirect 301 http://www.thebackcountrytrail.com https://highaltitudebrands.com
Redirect 301 http://thebackcountrytrail.com https://highaltitudebrands.com
Redirect 301 https://thebackcountrytrail.com https://highaltitudebrands.com

这是我得到的错误:

任何帮助将不胜感激。

【问题讨论】:

    标签: wordpress redirect http-status-code-301 http-redirect google-search-console


    【解决方案1】:

    请在您的.htaccess中添加以下代码

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^olddomain.com [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.olddomain.com [NC]
    RewriteRule ^(.*)$ https://newdomain.com/$1 [L,R=301,NC]
    

    或者你也可以使用301 redirect插件。

    【讨论】:

    • 该代码将所有页面重定向到新站点,但站点路径并不完全相同,因此我使用了一个名为 Redirection 的插件将特定页面重定向到新站点上的新页面。
    • 使用redirect-checker.org/index.php 一切都很好结果祝贺。一切似乎都很好。 thebackcountrytrail.com 301 永久移动 thebackcountrytrail.com 301 永久移动 highaltitudebrands.com 200 OK
    • 那个 Raju 但这不是我需要的解决方案,因为它重定向了我的所有页面,而我只想要主页。
    【解决方案2】:

    通过将此代码添加到我的 .htaccess 文件中,我只能重定向 Google 正在寻找的主页。我正在使用 wordpress 中的重定向插件将所有其他页面重定向到新站点上的新页面。

    RewriteEngine on
    RewriteRule ^$ https://highaltitudebrands.com/ [R=301,L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-21
      • 2017-07-21
      • 2017-07-25
      • 2015-04-04
      • 1970-01-01
      • 2015-04-27
      • 2012-08-27
      相关资源
      最近更新 更多