bit
bit

Reputation: 437

Googlebot cannot access my WordPress robots.txt

I have some troubles with Google indexing on my WordPress site. When I added my site to Google webmaster the .htaccess was the following

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Now, I tried to add these lines to .htaccess file, but Google still does not index my site.

# 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

Where am I doing wrong?

Upvotes: 1

Views: 192

Answers (1)

Hardik Visa
Hardik Visa

Reputation: 323

Create robots.txt file and upload your wordpress root folder with following code.

User-agent: google
Disallow:

User-agent: yahoo
Disallow:

User-agent: bot
Disallow:

User-agent: ask
Disallow:

User-agent: *
Disallow: /

And try to remove #BOT SETTING in your .htaccess.

Upvotes: 1

Related Questions