Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   301 Redirects (http://www.greenguysboard.com/board/showthread.php?t=58600)

PhoneMistress 2010-08-14 08:51 PM

301 Redirects
 
I am having canonical issues on my site which is wreaking havoc with my Google rankings.

So, I doubled checked everything. Turns out the 301 redirect was not set. So far I resolved with my host the 301 redirect for the canonical issues but am having difficulty locating the proper 301 redirect code to

1. Redirect the index.html to the root; and
2. Redirect pages and directories not found on the domain to the root.

Anyone know the code or a good place to find it?

Thanks again.

Simon 2010-08-15 06:52 AM

Regarding redirecting index.html to the root, it'll be best to specify the page which will be the root index page instead of index.html or you could wind up creating the conditions for an endless loop that you don't want. For example...

redirect 301 /index.html http://www.yourdomain.com/index.php

I'm not sure how to redirect a page or directory that doesn't exist.
Usually that's the job of the 404* redirect, not done by a 301 permanent replacement directive. For example...

ErrorDocument 404 /index.php

Both of those lines go in your .htaccess file. Make sure there's one space where shown, and that you use either relative or complete urls as shown in each instance. I'm just assuming index.php is your new index page so use whatever is correct in your case, but make sure to use the complete url.

Added: If you watch your server's error log for specific pages that get handled with a 404 you can add those to your .htaccess file using 301s in order to capture the PR of those missing pages and pass it along to wherever you redirect via 301 (if you believe it works that way). You can ignore the misspelled urls which get 404s of course.

PhoneMistress 2010-08-16 12:08 PM

Thanks for the information. I used your suggestions and I think everything is generating the right code now. There was something hokey about the server settings which automatically sets the 404 pass as a 302 redirect which is not search engine friendly.

I hate for this to happen to someone else. To double check my codes I used Rank Page and I traced them using a tool from SEO Consultants.


All times are GMT -4. The time now is 07:00 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc