Domain name setup
and redirects -
301 and 302's - Whether launching a new
site or restructuring an old one, making sure
the domain/domains are set up correctly is important.
Proper server syntax is critical for search engine
spiders to correctly index Web sites and their
content. Two common codes used by Webmasters when
a site has been redesigned or when a site is moving
from an old domain to a new domain are 301 and
302 redirects. A 301 is a "permanent redirect"
while a 302 is a "temporary redirect".
A 302, or temporary, redirect basically tells
the engine to come back later because this move
is only temporary. The engines would rather index
permanent content so the 301 (permanent) redirect
is (logically) preferred.
If you own multiple domains (to cover variations
on your brand name perhaps), but only use one,
it may be worth forwarding all the unused ones
to the one you want to use via a 301 redirect.
So how do you actually do a 301 redirect?
Well it does depend on what type of server your
site runs on. About 90% of websites run on either
an Apache or Windows webserver, so we will focus
on those for now. If you're not sure what server
that site is on - enter it at http://uptime.netcraft.com/
- and it will tell you.
Apache Servers - Basically you need to
upload an .htaccess file to the root folder of
your server (usually the same folder where your
index page exists). To make an ht access file,
open up notepad and save the document name as
.htaccess (make sure there is no format selected
when saving, so its not saved as .htaccess.txt
by accident).
Start the file with a first line reading "RewriteEngine
On" followed by the redirects you wish to
use.
Common ones include -
1) Moving subdomain to main domain and vice
versa -
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^subdomain\.domain\.tld$
[NC]
RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1
[L,R=301]
2) Moving someone who enters domain without
the www, to the www version in order to maintain
consistency -
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
3) Making the homepage url just the domain
name, instead of domain name and domain name with
default file name such as index.html which can
cause accidental content duplication.
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ page\.html\
HTTP/
RewriteRule ^page\.html$ http://www.domain.com/
[R=301,L]
4) Moving from old domain to new
RewriteCond %{HTTP_HOST} ^.*oldwebsite\.com$
[NC]
RewriteRule ^(.*)$ http://www.newwebsite.com/$1
[R=301,L]
(obviously,in these examples, replace "domain"
with your site, and so on)
There are many other ways htaccess can be used,
such as redirecting certain IP's (though this
isn't favoured by search engines) Still, alonger
list of different Apache htaccess examples is
available at http://www.evolt.org/ultimate_htaccess_examples
- or contact us
for more info on our overall services.
Windows Servers -
Basic 301 in asp - put the following code
in your old page, which will take traffic through
this page to the new one-
<%
Response.Status = "301 Moved Permanently"
Response.addheader "Location", "http://www.newwebsite.com"
Response.End
%>
For more overall use, you can also work with
filter tools such as
http://www.isapirewrite.com/ - which make
Windows redirects much easier.
For non-www to www, This requires a bit
more work - and use of the Open Internet Services
Manager.
Create your destination site, www.YOURSITE.com.
Make the content directory for the site be the
same directory, c:\inetpub/nameofsite
Select your web site in your windows server's
"internet services manager" and enter
the properties. The "home directory"
tab should have the "A redirection to a URL"
box checked. In the URL field right below iit
put the desired URL, for instance, with the www.
Then below the url, check the option that reads,
"A permanent redirection for this resource."
Other types of redirects and checkpoints-
1) Make sure to redirect both www and non-www
versions where necessary.
2) If you have an established site and are moving
domains, you may want to also move individual
key pages one by one in order to maintain
link strength and its position in search engines.
3) Meta Refresh and JavaScript redirects should
never be implemented on a website, unless
it is absolutely critical to do so. Search engines
do not recognize JavaScript redirects and so will
end up indexing an incorrect page within the site,
therefore making the redirect redundant.
3a) An example of how the JavaScript redirect
may be written is below:
<html><head>
<script type="text/javascript" language="JavaScript">
function Redirect() {location.href="/index.htm"
}
</script></head><body onload="Redirect();">
</body></html>
As the JavaScript won't be parsed by search engine
spiders, they will not be able to interpret the
above code.
3b) "Meta Refresh" redirects
(which load the old site page and then in a certain
amount of time automatically take the user to
the new destination) are heavily devalued in search
engines and should only be used in extremely rare
cases. Most of the time, they are ignored by search
engines and as a result do not fulfil their purpose.
As a result, we have not covered this here.
For any questions or advice, or further information
on optimizing your
website with evolution search marketing,
please drop us a line
Tag this page and use it for resource. share
with your friends on....
del.icio.us
Digg
Newsvine
Reddit
MyYahoo!
Facebook
or Sphinn
it for the internet marketing community
|