Welcome to WebmasterWorld Guest from 3.227.233.6

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Added 301 redirects to domain and all my google traffic has vanished!

     
3:36 am on Oct 27, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 18, 2005
posts:49
votes: 0


Hi all, this is kind of alarming, not at all what I was expecting.

I found that this domain(blog with Wordpress) had a good PR on example.net/ & example.net/index.php but had a PR of 0 on example.net

So I thought that adding a redirect was the thing to do. After doing so all my Google traffic has vanished! Do you think this is temporary?

This is the code I used;

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule . /index.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.php? [NC]
RewriteRule ^(([^/]*/)*)index\.php?$ http://www.example.net/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^mysite\.net [NC]
RewriteRule ^(.*)$ http://www.example/$1 [R=301,L]
</IfModule>

Any suggestions would be greatly appreciated.

Thanks in advance.

[edited by: tedster at 4:43 am (utc) on Oct. 27, 2006]
[edit reason] use example.net [/edit]

5:08 am on Oct 27, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Because of a missing [L] flag on your WordPress URL rewrite and the order of your rules, I'm afraid that you've told Google that the only blog page that exists on your site is "/".

I would suggest an immediate revision to this order:


RewriteEngine On
RewriteBase /
#
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.php? [NC]
RewriteRule ^(([^/]*/)*)index\.php?$ http://www.example.net/$1 [R=301,L]
#
RewriteCond %{HTTP_HOST} ^mysite\.net [NC]
RewriteRule (.*) http://www.example.net/$1 [R=301,L]
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Jim

[edited by: jdMorgan at 5:09 am (utc) on Oct. 27, 2006]

5:57 am on Oct 27, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 18, 2005
posts:49
votes: 0


Oh my! I really feel foolish! I single-handedly killed my site! :(

I cant understand why Wordpress would generate htacces code for the permalinks that makes use of <IfModule mod_rewrite.c> when there is much simpler code available...

jdMorgan- thank you so much for helping me out and pointing out the difference. I really appreciate it. I've always had problems configuring apache..

I hope big G will come back soon...

10:46 am on Oct 27, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


The index\.php?$ part is telling Google to redirect for both index.php and index.ph.

You might want to remove the ? from the code (2 places). That code is used for index.html? so that both index.html and index.htm are redirected.

12:55 pm on Oct 27, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


I wondered about those trailing "?" characters, and suspected they were cut-n-paste legacy, but there were bigger problems at hand...

Victor, just fix the code and wait a few weeks, and all should return to normal. The 'attack vector' for removing your pages was through links to your 'wrong domain' -- one of the things that the code fixes. I'm pretty sure that like most sites, yours will have far more links to the 'right domain' and that these will quickly overwhelm the incorrect ones. So, I'd expect the problem to clear up fairly quickly (in search engine indexing cycle time, at least).

Jim