301 Redirects Using .htaccess File

29 Dec 2007 at 22:41 by Joshua J. Steimle

First of all, this only works on web servers running on Linux, like Apache. It's no good on a Windows server, which stinks, because I think this is the best way to do redirects because you can manage all the redirects on your entire site from one file, and you don't actually have to create files and directories or leave old ones in place in order for those urls to be redirected.

Here's the basic code you'll put in your .htaccess file, which either should already exist in the root directory of your website ("root directory" meaning the home directory of your website, where your homepage file is located) or which you'll need to create:

RewriteEngine On
RewriteRule ^directory/youroldpage.html$ http://www.yoursite.com/directory/yournewpage.html$1 [R=301]

Of course you would replace "directory" with the directory structure of your own site, and "yoursite.com" with whatever your site is and "yournewpage.html" and such with your pages.

Once again, the SEO reason why you want to use a 301 redirect is because it tells the search engines that this is a permanent change in the location of the content, and so the search engines will de-index the old page, index the new page, and pass the value of the old page onto the new page.

digg digg it!  delicious, mmm Add to del.icio.us

Comments

Yes, IIS for Windows sucks. http://www.isapirewrite.com/ can help cure some of the woes.

Posted by: Jordan Kasteler at January 2, 2008 08:11 AM

Post a comment




(you may use HTML tags for style)

Recent SEO Articles

Why Google Shouldn't Discriminate Against Paid Links

21 Apr 2008 at 14:58 by Joshua J. Steimle

Because it can't accurately identify them. Frankly, I don't have much against Google having something against paid links. It's their search engine, they can do whatever they want with it. Of course I'd prefer they live and let live when it comes to paid links, for my own self-interest as someone who occasionally uses paid links as a way to build incoming links for my SEO clients.

But the problem is there's no way for Google--I should say "no effective way"--to differentiate between a paid link and one that isn't paid for.

The SEO Con Artists

17 Apr 2008 at 09:31 by Joshua J. Steimle

A real description of an SEO firm on an SEO directory:

Full service 1-on-1 SEO marketing since 1996. Check out comprised month-to-month packages at SEOgame.com (Eg. $375 package will start out at 2,220 manual directories and 550 manual article directory submissions) Manual submission services will provide permanent 1-way links and include 3 project managers and 17 site submitters to get the job done right with lots of worrrrrrrrrrrrrrrrrk! Get to the top of the in less than a month for your top keywords today.

If you're shopping for SEO services and you hear this type of pitch, you might figure "Hey, it's only $375 and maybe I'll get something out of it even though it sounds too good to be true." But what you should be thinking is "For $375 I could take my wife out for a really, really nice night on the town, and the ROI would be higher to boot."

Fixing Other SEO Firms' Mistakes Using Dreamweaver Wildcard Search and Replace

20 Feb 2008 at 18:31 by Joshua J. Steimle

All too often we take over search engine optimization efforts for a new client, only to find that the last SEO firm or SEO professional they were using did so many things wrong it's going to be a major effort just to clean up their mess, let alone start making progress (although I suppose cleaning up is a form of progress, but you know what I mean).

Case in point, we just took over doing SEO for a billion-dollar enterprise with a substantial website, and what do you know, the last SEO people working on it stuffed the site full of stuffed image alt tags, stuffed keyword meta tags, stuffed url title tags, etc. And they were very thorough with their work in that they didn't repeat the content of the various tags, they mixed it up in every case so they aren't the same and therefore you can't do a simple search and replace to find them all. The slow way to get things done would be to edit every page by hand, deleting the offending code, but thankfully Dreamweaver lets you do a wildcard search and replace that is a lifesaver.

Organic SEO Articles >>