Thursday, February 4, 2010
Redirecting non-www to www on Zeus Servers
Duplicate content is a problem that can penalise your search engine ranking. If your domain is present at both ‘http://yourdomain.co.uk’ and ‘http://www.yourdomain.co.uk’ then a duplication exists. This can cause dilution of the benefit of links to your website as some websites may link to the non-www and some to the www domain. A redirection needs to be set up to redirect the non-www domain to the www version. Although there are plenty of instructions on the internet as to how to achieve this on Apache servers there is very little information relating to Zeus servers.
Here is how you redirect a non-www domain to the www version on a Zeus server.
Firstly, you need to create a text document (Notepad will do) and put the following code into it…
match IN:Host into $ with ^yourdomain\.co\.uk$
if matched then
set Response = 301
set OUT:Location = http://www.yourdomain.co.uk%{URL}
set OUT:Content-Type = text/html
set Body = Go <a ref="http://www.yourdomain.co.uk%{URL}">here</a> instead.
endif
NB Replace ‘yourdomain’ with your website domain name (in 3 different places above) noting that on the first line each ‘dot’ in your domain name needs to be preceded with a back-slash.
Save this file as ‘rewrite.script’. Once saved, the file needs to be uploaded to your website in the ‘root’ directory either by FTP or other file manager interface provided by your website hosting company (refer to your ISP for details).
Now, when you type in ‘yourdomain.co.uk’ into your browser, you will automatically be redirected to ‘www.yourdomain.co.uk’ and so will the search engines.
Add comment
Fill out the form below to add your own comments