Joomla web development, eMarketing and training
Home eMarketing SEO Tips Redirecting traffic from old domains?
SEO Tips
Redirecting traffic from old domains?
Friday, 26 September 2008 11:43

The Question:
We have several old domains, projects started but not completed, etc.  None are worth the time to redevelop, or keep around. Plus, they are taking up server space.  What should we do with them?

Answer:
Many developers have this situation. We try things, run a test here, set up a beta site there, client changes their mind, wants to go in a new direction, etc.  In some cases we simply remove the beta site and let any spider traffic they acquired die.  In other cases, if it's a project somehow relevant to our parent site, we may redirect the old site to our parent site.

There are several ways to do this.

1) Put an announcement on every page of the site that the site is inactive and provide a link to the parent site.

2) Use a meta refresh tag, which will load the original page first then refresh to the new page where you want the traffic to go. *Note, this is old school, and unfortunately was abused by the spammers and black hat SEO's.  This is NOT advisable in any circumstance.  We mention it so you do not read it somewhere else and think using a refresh is a good idea.

3) Park the domain on top of your parent sites.  You do this via your domain register, DNS and your server control panel.  This will cause a "Mirror" domain, which is bad.  The way to resolve the mirror domain issues is with a simple .htaccess rewrite. Here is the code.

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.parentdomain\.com
RewriteRule (.*) http://www.parentdomain.com/$1 [R=301,L]

This code goes in the .htaccess file of your parent domain.  This code checks to see if the domain requested contains the parent domain.  If not, then it 301 redirects the request to the parent domain.  This lets the search engines know that you are following the rules and not spamming them with a "Mirror" domain.  We often have to set this in place for clients who had mirror domains.

4) You can also use a .htaccess code in the old sites root level.  It looks like this:

redirect 301 / http://www.newdomain.com

This tells the server to direct all traffic to the new site.

In both number 3 and 4, there will be issues of "broken" files in sub.folders.  For example.

The old url is:
/old/url.html

If someone tries to go to that page, and no file on the new site has the same architecture, then a new site will show an error page.  There are two solutions to this:

1) Set up a custom error page with a site map.  In the error page be sure to include a robots index tag of no cache follow.  In the body of the page, be sure to have links, at least, to your primary pages.  Be sure to tell your server to send all requests with errors to the custom page.

Here is the code that goes into your new sites .htaccess file.

ErrorDocument 400 /error.html
ErrorDocument 401 /error.html
ErrorDocument 403 /error.html
ErrorDocument 404 /error.html
ErrorDocument 500 /error.html

2) You can also set .htaccess redirects for the missing pages.

Redirect 301 /old/url.html http://www.parentdomain/newurl.html

3) Don't worry about it.  Eventually, the search engines will remove the bad links from their cache and people will stop trying to enter your site though the old urls.

*Note: If any of the old site urls are particularly popular and have "deep links" from 3rd party site that you want to redirect to the new site, then do take the time to set up individual redirects.  This will help preserve page rank, as well as link popularity.  Though, a word of caution.  If the old sites link popularity is not relevant to the parent site, you may want to just let them die.

Last Updated ( Friday, 26 September 2008 11:48 )
 

Add your comment

Your name:
Subject:
Comment:
  The word for verification. Lowercase letters only with no spaces.
Word verification:


+ Suggested tags