Forum Moderators: phranque

Message Too Old, No Replies

Google all of a sudden doesn't like my redirect

Google webmaster console redirect error messages

         

babushka

12:30 am on Nov 12, 2006 (gmt 0)

10+ Year Member



Hi all, I desperately need help. I just can't figure out this redirect stuff.

All of a sudden after 2 1/2 months, google has decided it doesn't like my redirect. It had no problems with it for 10 weeks and indexed

everything just fine over that time period. Now I get this in the Google Webmasters Console:

URL Detail Last Calculated
[mydomain.com...] Redirect error [?] Nov 2, 2006
[mydomain.com...] Redirect error [?] Nov 2, 2006
[mydomain.com...] Redirect error [?] Nov 2, 2006

Here is my .htaccess file:

AddHandler server-parsed .htm .html

Options +FollowSymLinks
RewriteEngine On

# domain.com to /subdir/
rewritecond %{http_host} ^mydomain\.com [NC]
rewritecond %{REQUEST_URI}!^/subdir/ [NC]
rewriterule ^(.*)$ /subdir/$1 [R=301]

# www.domain.com to non-www
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com [NC]
RewriteRule ^(.*)$ [mydomain.com...] [r=301,NC]

# index.php to www.domain.com
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ [mydomain.com...] [R=301]

#redirect old pages from old site that use to be in root directory
redirect 301 /subdir/index.html [mydomain.com...]
redirect 301 /subdir/about.html [mydomain.com...]
redirect 301 /subdir/activities.html [mydomains.com...]

ErrorDocument 404 /subdir/missing.html

Here are the response codes for the first redirect error above:
URL=http://www.mydomain.com/
Result code: 301 (MovedPermanently / Moved Permanently)
New location: [mydomain.com...]

URL=http://mydomain.com/
Result code: 301 (MovedPermanently / Moved Permanently)
New location: [mydomain.com...]

URL=http://www.mydomain.com/subdir/
Result code: 301 (MovedPermanently / Moved Permanently)
New location: [mydomain.com...]

URL=http://mydomain.com/subdir/
Result code: 301 (MovedPermanently / Moved Permanently)
New location: [mydomain.com...]

URL=http://www.mydomain.com/subdir/index.php
Result code: 301 (MovedPermanently / Moved Permanently)
New location: [mydomain.com...]

URL=http://mydomain.com/subdir/index.php
Result code: 200 (OK / OK)

jdMorgan

2:21 am on Nov 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You've got rules redirecting to www.example.com and others redirecting to example.com. As a result, you've confused Googlebot.

I'd suggest you pick one or the other...

Jim

babushka

2:29 am on Nov 12, 2006 (gmt 0)

10+ Year Member



Ok I'm stupid I admit it lol. I looked at that but I wasn't sure I should change it.

Thanks for your help, hopefully that was the Google problem!

jdMorgan

2:41 am on Nov 12, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, this rule should have a canonical URL:

# domain.com to /subdir/
rewritecond %{http_host} ^mydomain\.com [NC]
rewritecond %{REQUEST_URI} !^/subdir/ [NC]
rewriterule ^(.*)$ /subdir/$1 [R=301]

The rewriterule should read:

RewriteRule ^(.*)$ [b]http://www.example.com[/b]/subdir/$1 [R=301]

Jim