|
The following post is about using
redirection to keep your existing search engine ranking for content
on an old domain. Here's my story: I purchased multiple domains
and by default set them to all direct to the same content (eg.
document root). When I started my search engine optimization kick I
realized that different domains got better search engine rankings
than others - even on the EXACT same content. And google thought
that I had more links from external sites than I actually did. Some
of you might think that sounds good because there were more
external links than there should be, but most of them were links to
things I didn't want high links to like my registration page, site
search, etc.
I finally moved my sites to a new server
and decided it was probably a good time to start segregating my
domain content. I plan on retiring flamingcube.com sometime later
in the year, so I'm trying to get the SEO results for it
transitioned to the new server. I plan on using the other domains I
have registered for completely new sites so I want to start getting
all the content pushed over now so in a few months I can remove the
redirects and start with new content.
Redirect Old domain to New
domain
Simply create an .htaccess file in the
root of your domains document root (often public_html) - this is
the same place you would probably have an index.html file. Add the
following text to the .htaccess file and save it. Make sure you
replace newdomain.com with your new domain you want the content
redirected to.
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)
http://www.newdomain.com/$1 [R=301,L]
I should note that this method of
redirection only works on servers that support the mod_rewrite
apache module. This would typically just mean Apache servers with
mod_rewrite installed, but you can get it working on IIS servers if
you have a similar mod_rewrite module that can parse htaccess
files.
Redirect www and other domains to
proper domain
This is the next peice of my SEO kick.
I'm testing out a new search component for Joomla called PixSearch
that creates a search dropdown similar to Apple.com. It uses AJAX
to send your request to the site search while you are typing and
pulls up search results directly on the page. The only issue with
this is the search module uses the joomla defined site domain to do
the search. If you land on the page using a subdomain or other
domain that points to the same document root the search will fail
to execute to prevent XSS (cross site scripting)
vulnerabilities.
Regardless, it's probably a good idea to
standards your domains and use the proper redirection. This updates
search engines and makes it easier for coders to develop
software.
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com
[nc]
rewriterule ^(.*)$
http://www.domain.com/$1 [r=301,nc]
As with the other .htacess file, replace
the domain names with your actual domain name. |