【发布时间】:2015-10-07 21:14:37
【问题描述】:
我的 WordPress 网站上的 Google 索引有些问题。
当我将我的网站添加到 Google 网站管理员时,.htaccess 如下
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
现在,我尝试将这些行添加到 .htaccess 文件中,但 Google 仍然没有索引我的网站。
# BOT SETTINGS
SetEnvIfNoCase User-Agent .*google.* search_robot
SetEnvIfNoCase User-Agent .*yahoo.* search_robot
SetEnvIfNoCase User-Agent .*bot.* search_robot
SetEnvIfNoCase User-Agent .*ask.* search_robot
Order Deny,Allow
#Deny from All
Allow from env=search_robot
我哪里做错了?
【问题讨论】:
-
请尝试删除 SetEnvIfNoCase User-Agent .*google.* search_robot 部分,然后重新提交。
-
我是防火墙问题。谢谢大家
标签: wordpress .htaccess robots.txt google-search-console googlebot