Search Engine Friendly Redirects Using Apache

HTTP Status code 301 is a server response for a page that has been moved permanently. If you have a primary domain with one domain extension, such as foo.com, and several secondary domains with different extensions, such as foo.net and foo.org, that you want to wind up at the primary domain use the 301 server response. This will let search engines know about your primary domain. The 302 responses can adversely affect your search engine rankings. Your domain registrar may be able to take care of these redirects for you.

Apache can also take care of redirects. Have the secondary domains resolve to where the apache server is running, and set up a virtual server to handle the redirects. The configuration could look something like this:

<VirtualHost *>
 ServerName foo.net
 ServerAlias foo.net www.foo.net
</VirtualHost>

<VirtualHost *>
 ServerName redir_foo_domains
 ServerAlias foo.com *.foo.com foo.org *.foo.org
 Redirect 301 / http://foo.net
</VirtualHost>

Check the server headers to verify that your secondary domains are redirecting correctly. There are a few sites that can do this for you, such as http://www.seoconsultants.com/tools/headers.asp