Jump to content

SEO-friendly redirects


tinacious
 Share

Recommended Posts

Hi there. I'm hosting my site on a friend's domain. In Google, when searching my site, it shows up as me.friendsdomain.com. I want it to show up as mydomain.com. Can I change this somehow using htaccess? If so, which parts of the file do I modify? Thanks.

Link to comment
Share on other sites

First, make sure that you can access your site at mydomain.com and that it stays there as you browse it. You want to make sure there isn't anything redirecting back to me.friendsdomain.com. Once you've got that down, you are likely safe to setup a redirect at me.friendsdomain.com. You'll want to use a 301 Permanent redirect to ensure that it is SEO friendly. Though note that even SEO friendly redirects can make Google shy for a bit, especially if you've been at the previous URL for a very long time.

The following can be added to your .htaccess file on me.friendsdomain.com, directly after your "RewriteEngine On" line:

RewriteCond %{HTTP_HOST} me\.friendsdomain\.com
RewriteRule ^(.*)$ http://mydomain.com/$1 [R=permanent,L]

This has worked well for me, but you will want to check that all works correctly on your server too by using a browser plugin to make sure you are getting the proper 301 redirect header.

Link to comment
Share on other sites

Thank you very much for this, Ryan. I typed me.friendsdomain.com in my browser and it redirected to mydomain.com. I have Chrome and Firefox, which browser plugin do you suggest using to check the 301 redirect? Is there hidden information to check out using the plugin?

And yes, my concern is with Google and having it show up properly. By SEO-friendly redirects making Google shy for a bit, do you mean that it will take a while for it to show up properly on Google (as mydomain.com)? I have been at this address for quite a while, yes.

Link to comment
Share on other sites

I think there are multiple ways to examine this, but I've always used the LiveHttpHeaders add-on in Firefox. I think you can also do it with Firebug and Chrome's inspector. If you want to send me the URL here or by PM, I'll be glad to check it for you.

By Google being shy, I mean that a portion of your search traffic may stop temporarily. Or it may not. If I've run a site for a year or two, the 301 redirects seem to work right away with no affect on traffic. But I've done them with a couple of sites running at the same URL for 6+ years, and have found the site disappear from the search results, temporarily. It makes me wonder if a change to something that's been one way for a long time sends it to some queue for somebody to look at manually to make sure there's no monkey business going on... who knows.

All the 301 redirect scenarios I've been involved with have been at the same domain. Changing a page's path from an old URL to a new one. However, I've not completely changed domains like you are trying to do. There is value to a domain name from its age and combined quantity of incoming links. It's a lot easier to make a site perform on an old/existing domain than it is on a new domain. So I guess what I'm saying is that you should probably expect there to be some loss of search traffic as a result of completely changing the domain. But I can't say for sure as I've not had experience with this myself to witness the effects.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...