301 redirects and .htaccess files
17 Sep 07 Filed in:Blogging
301 redirects, oh no, that sounds geeky. Indeed, it is, but 301 s, as we call them in the game, are a part of blogmeistery that you need to be aware of.
The simplest scenario is using a 301 to keep the traffic going to posts that you have re-named or moved.
Sometimes I am so pleased with a post that I forget to give it a Google friendly Permalink ie I stick with the default http://thepisstakers.com/1237y312 hgsdfagkjsdguqoyw.html instead of cool-post.html. Once it is published and people start bookmarking it, you can't just rename it properly and re-publish it. Or rather you can, but bookmarks to the original URL will be broken.
I have a load of naff URLs, and if I were smart I would rename them more usefully, republish and then go to the Control Panel and use a 301 to auto redirect the first wierdy URL to the slick new one.

The second scenario is consolidating links to one domain. In plain English, I set up this site as http://thepisstakers.com, thinking it is simple for people to type. There are 15000 incoming links to that URL, which is good. However, 30% of people still insist on linking to http://www.thepisstakers.com, so there are 5000 separate links to the www. address too. This is no big deal in terms of keeping posts findable, but for SEO purposes, Google treat each URL as a different website. Bottom line, having two variations of the same domain on the internet dilutes the overall value of The Pisstakers in search engine rankings.
To rectify this common mistake, ordinarily you just go to the Control Panel and fill in the blanks to do a 301 redirect.
Of course nothing is quite so simple for a Pisstaker as filling in the blanks. I created an infinite loop of redirects and no page on the site would open! That is where my web hosts, A Small Orange came to the rescue after midnight last night.
Hello,
I have set this up for you in your .htaccess file with the following:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^thepisstakers\.com
RewriteRule ^(.*)$ http://www.thepisstakers.com/$1 [R=permanent,L]
How cool is that for support?!
This graphic shows the state of the site before the changes.

Now, there are 20,000 incoming links to www.thepisstakers.com regardless of which URL people have used. ie 75% more links have suddenly appeared and that should do this site a little bit of good in the search engine ranking world. And even if the Pisstakers does not move above the top 72% of sites on the internet (hahahahaha) it is nice to know the site is tidy behind the scenes, thanks to a "simple" redirect.
301 a moved post
The simplest scenario is using a 301 to keep the traffic going to posts that you have re-named or moved.
Sometimes I am so pleased with a post that I forget to give it a Google friendly Permalink ie I stick with the default http://thepisstakers.com/1237y312 hgsdfagkjsdguqoyw.html instead of cool-post.html. Once it is published and people start bookmarking it, you can't just rename it properly and re-publish it. Or rather you can, but bookmarks to the original URL will be broken.
I have a load of naff URLs, and if I were smart I would rename them more usefully, republish and then go to the Control Panel and use a 301 to auto redirect the first wierdy URL to the slick new one.

301 for SEO heaven
The second scenario is consolidating links to one domain. In plain English, I set up this site as http://thepisstakers.com, thinking it is simple for people to type. There are 15000 incoming links to that URL, which is good. However, 30% of people still insist on linking to http://www.thepisstakers.com, so there are 5000 separate links to the www. address too. This is no big deal in terms of keeping posts findable, but for SEO purposes, Google treat each URL as a different website. Bottom line, having two variations of the same domain on the internet dilutes the overall value of The Pisstakers in search engine rankings.
To rectify this common mistake, ordinarily you just go to the Control Panel and fill in the blanks to do a 301 redirect.
.htaccess redirect
Of course nothing is quite so simple for a Pisstaker as filling in the blanks. I created an infinite loop of redirects and no page on the site would open! That is where my web hosts, A Small Orange came to the rescue after midnight last night.
Hello,
I have set this up for you in your .htaccess file with the following:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^thepisstakers\.com
RewriteRule ^(.*)$ http://www.thepisstakers.com/$1 [R=permanent,L]
How cool is that for support?!
This graphic shows the state of the site before the changes.

Now, there are 20,000 incoming links to www.thepisstakers.com regardless of which URL people have used. ie 75% more links have suddenly appeared and that should do this site a little bit of good in the search engine ranking world. And even if the Pisstakers does not move above the top 72% of sites on the internet (hahahahaha) it is nice to know the site is tidy behind the scenes, thanks to a "simple" redirect.
.
...
.
.
.


