301导致Google无法抓取网站

时间:2018-08-21 06:15:19

标签: wordpress .htaccess redirect http-status-code-301 http-status-code-302

问题:

就像总的菜鸟一样,我做了301重定向而不是302重定向。现在Google正在努力寻找新网站。我从HTML网站转到WordPress网站。在建立新网站时,我在http://www.themurraypestcontrol.com/index.html上进行了301重定向到http://www.themurraypestcontrol.com/v1/index.html。显然,“永久”并没有记在我心中。我现在正在尝试让Google抓取https://themurraypestcontrol.com,但是301似乎正在影响我创建准确的站点地图的能力。我相信这是Google无法正确抓取我的网站的原因之一。

目标:

  • 修复URL,以便Google可以找到该网站并进行爬网。该网站有机地掉下了悬崖。我已经尝试过使用Goggle网站站长工具了解的所有技巧,但是无法在搜索结果中显示新网站。
  • 在新网址上启用HTTPS
  • 最好以https://www.themurraypestcontrol.com作为主要网址

潜在的解决方案:

我所知道的:

此网站http://www.redirect-checker.org/index.php确认重定向已发生。

enter image description here

在尝试生成站点地图时,我看到了这一点(请参见屏幕截图)。因此301重定向不在https URL上,而在http URL上。 enter image description here

当我放入https://themurraypestcontrol.com时,它会生成此站点地图(LINK)。该站点地图不包含网站的主页。

themurraypestcontrol.com/general-pest
themurraypestcontrol.com/termites
themurraypestcontrol.com/bed-bugs
themurraypestcontrol.com/contact-us

robots.txt

User-agent: *
Allow: /

Sitemap: https://themurraypestcontrol.com/sitemap.xml

.htaccess

.htaccess有很多我从未见过的东西,但是我知道可以从.htaccess中执行301或302。

# BEGIN WordPress
AddHandler application/x-httpd-php70 .php
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access plus 6 hours"
    ExpiresByType image/jpeg "access plus 6 hours"
    ExpiresByType image/gif "access plus 6 hours"
    ExpiresByType image/png "access plus 6 hours"
    ExpiresByType text/css "access plus 6 hours"
    ExpiresByType application/pdf "access plus 1 week"
    ExpiresByType text/javascript "access plus 6 hours"
    ExpiresByType text/html "access plus 10 minutes"
    ExpiresByType image/x-icon "access plus 1 year"
    ExpiresDefault "access plus 3 hours"
</IfModule>
Header set X-Endurance-Cache-Level "2"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

# Wordfence WAF
<Files ".user.ini">
<IfModule mod_authz_core.c>
    Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
</IfModule>
</Files>

# END Wordfence WAF

0 个答案:

没有答案
相关问题