My WordPress blog seems to be returning a 301 redirect for Googlebot but it seems to be working fine in the browsers. Within Google Webmaster Tools I fetched my site (www.brandculture.com/blog) as Googlebot and this is what was returned:
HTTP/1.1 301 Moved Permanently
Date: Sun, 17 Jan 2010 17:49:46 GMT
Server: Apache/2.0.54
Location: http://www.brandculture.com/blog/
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 242
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.brandculture.com/blog/">here</a>.</p>
<hr>
<address>Apache/2.0.54 Server at [www.brandculture.com](http://www.brandculture.com/) Port 80</address>
</body></html>
However, if I view this in the the browser I’m seeing the blog just fine without a redirect of any kind. Why is the server doing this 301?
Here is my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
The individual pages such as /blog/index.php seem to load without the 301 but /blog still produces a 301. Again, everything works correctly in the browser. It’s just Googlebot that’s seeing this. Here’s the root .htaccess file:
Sorry for all the replies - just learning more about this as I go. I’ve just tried the same thing on a completely different domain with the same directory structure and getting the same results. This appears to be more of a WordPress thing. Has anyone ever experienced this before?
There’s NOTHING there that even affects blog or blog/index.php. The only “redirection” is Apache recognizing that blog is a directory rather than a file and find the first DirectoryIndex it can (index.php) to serve. I wouldn’t call that a 301 but your bot seems to think otherwise.