Focus

This is the blog for my web design, development and marketing company, Red Kite Creative. Mostly what I'll be writing about is work-related but anything is fair game. Read more about me here...


View Debbie Campbell's profile on LinkedIn

What I'm Reading



View my bookstore













.htaccess Files - on old host or new host?

May 31st, 2007 by debbie campbell

I have a new client with an old and new web site, who asked me yesterday how to redirect one to the other. I knew that I should use a 301 permanent redirect, but oddly enough, I wasn’t sure where to put the .htaccess file.

In the past, I’ve only ever used a 301 or 302 redirect for files on the same server. I guess that might sound dumb, but I didn’t know if the .htaccess file should go on the old site’s server or the new one, and I looked around for half an hour on Google and couldn’t find the answer to that question.

So I’m posting what I found out here - if you change your domain name and redirect Site A to Site B, the .htaccess file (assuming you’re using Apache server) needs to sit on Site A, kind of like a detour sign. And if you’re trying to recapture good rankings from the old site, leave it up for awhile, like up to a year. This will give the search engines plenty of time to get the new pages indexed (and for your visitors to change bookmarks) before you take the old site down.

Posted in Web Design |

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment a bit. Please stay on topic. If you submit spam or irrelevant comments, it will be deleted and your IP will be banned.