Redirect non www url to www url


Search engines consider http://dscripts.net and http://www.dscripts.net as different site. So when your pages are accessible with both www and non www url your pages from referer sites and search engines break into two parts. Thus you get only half benifit from search engines.

So to optimize your search enginge referals to maximum you must use either only www or non www urls by redirecting one to another. In most in this case websites redirects non www url to www url.

To do put this code at the top of your .htaccess file.

[pre]
# Non www url to www url
RewriteCond %{HTTP_HOST} !^www\.dscripts\.net
RewriteRule (.*) http://www.dscripts.net/$1 [R=301,L]
[/pre]

Dont forget to change the name of your domain from the avobe code.

Related posts:

Tags: , ,

To make money we lose our health, and then to restore our health we lose our money.... We live as if we are never going to die, and we die as if we never lived!

Leave a Reply