Friday, September 4, 2009

Handling 301 redirects

Here's a seo copywriter tip: understand what a 301 redirect is.
I just moved a pretty decently big site (250 pages), and had to make sure I did not slip in the search engines.
The site is a totally new way of presenting content to the world from this company, so I am tasked to make sure anyone who is used to coming here can still do so as they have been, and that new ones can find it as well. lots of new content, so lots of change and freshness to attract some attention - or at least, retain it.
Enter the 301 redirect.

Simple Explanation of 301 Redirects
If you don't already know, there are different codes that computers use for different types of commands and errors. Some of these commands are pretty universal across any computer, like a 404 error means a page can't be found, a 302 redirect is a temporary redirect to a different URL, and a 301 redirect is a permanent redirect of a URL.

You have a site, and want to move it. You want the old URLs to still find the new pages in the new place, so you push them forward with a little bit of code. The 301 redirect does this for you.

Conceptually, they are easy to understand.
Let's say, in the new site structure, what WAS a folder named "images" has had its content shifted to a new folder named "assets." Using a 301 redirect, you force requests for the old URL to find the new one. 301 simply means that permanently, this old URL will forever be this new one. The intent is that in time, the old URL will disappear, being replaced by the new one.

Your 301 might look something like this:
/images/my_image.jpg redirect /assets/my_image.jpg

You replace one url with the new one. In this example, I am using relative paths instead of absolute paths. It depends on how you deploy the 301 redirects as to which syntax is most appropriate for you - but whether it is best for the absolute or relative paths to be used, it is pretty easy to do this correctly.

The tricky thing about a 301 redirect, it the way that you handle it will depend on the server type and the kind of website you have built.

Lots of times, a simple solution is available. For example, on a Linux server, you can use what they call an ".htaccess" file to handle these commands for you, and very few things are easier to create that this file full of redirects. There is plenty of information on creating this file correctly out there. If you find you are using a Linux server and can use a .htaccess file, I strongly suggest getting to know this file, and what it can do for you.

Other times, like if you are using a Windows server or a technology that does not use a .htaccess file, you need to find what works within your situation. The variables you bring specifically will determine how you create and deploy this effort (one size will not necessarily fit all here).

In my case, once again I was not so lucky...this was not a Linux server. It was a Windows server, moving to another Windows server and a rather complex CMS/Portal solution. I had to find a different way to create my 301 redirects, and it was very important to get it right.

Research What Works
My best advice to an SEO writer to make the most of what a 301 can do, is know where to find answers for different situations you will encounter. Learn very specifically how a 301 works, and then learn how to code it in a couple different ways. Base your efforts on the ways that you usually code sites...be it in .php, .asp, .NET, or whatever. If you have a tendency to move sites to a specific type of web server, learn more about how to control and protect the information held by that server.

In my case, I asked the programmers what the server specs and site specs were, and found I could do my 301s most effectively using an XML file, which would be handled in a specific way by the CMS/portal we had in place. We tested a few urls, and created a snippet for me to work from.

I collected all known URLs, and connected them in a spread sheet to their new counterpoints. I wrote it in a syntax that would work for the CMS, creating the actual commands in the file using notepad, saving the final as an XML file...this was the researched and tested solution. The final 301 redirect sheet pushed more than 200 URLs to new locations.

In the end, I was able to protect my client's site through this very large-scale change.
I also created specific error page content to handle anything I did not repoint more specifically.
They were pleased the move went smoothly, and were glad I showed them all the links were working as we desired. It was all good.

Why is this important to a freelance SEO copywriter? Because the more you can offer to clients, the more valuable your services become to their projects. Show them continued, repeating value, and work then finds you. Cold calls will slow down as a necessity or even stop, and if you get lucky, you can get to hand-pick your clients.

I'd say that's worth it.

No comments: