March 22, 2007

Sorting out my Google PR

I figured out what the problem was was with my PR, thanks to a comment from Suni. Basically, Google had split up my PR across http://www.u-g-h.com and http://u-g-h.com. This could have been due to some incoming links with the former, or because I had been messing around with Google Webmaster Tools and had some issues there.

I fixed that out, but it will be some time before my PR adjusts itself. In the meantime, I’ve implemented a 301 HTTP Redirect to stop it from happening again. The elegant way to do this is to use an entry in your .htaccess file, however as I’m on IIS I didn’t have this luxury. Instead, I implemented this in the header of my website.


$_SERVER[HTTP_HOST] = strtolower($_SERVER[HTTP_HOST]);
if($_SERVER[HTTP_HOST]=="u-g-h.com") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.u-g-h.com");
exit();
}
?>

This ensures that if I get a request without the www., it will redirect to the proper page. Fingers crossed that this will sort out my PR.

2 Readers Commented »

  1. I think that’s a step in the right direction. Good luck!

  2. Interesting, and something new for me.

    Thanks for the link :-)

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Media Corner

2

3

4

5

6