(Reading time: 1 minute)

 Apache

What does this mean?

It means automatically redirecting http://domain-name.com to http://www.domain-name.com.

There are many benefits of redirecting traffic from non-www to www.

The main advantage is, it will avoid duplicate content in search engines like Google and Bing. It will also give a consistency to your website.

So how to implement this?

Just copy paste the below three lines in your .htaccess file.

 
 
 
RewriteEngine On 
 RewriteCond %{HTTP_HOST} !^www\. 
 RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
 
 
 

Now your non-www traffic is redirected to www traffic.

Oxygen
Author: Oxygen
Other articles by this author

Chillzee Tag Cloud

Let's Socialize

About Chillzee

Chillzee.com is an entrepreneurship portal.

The site provides informative topics on Organizational and Strategic needs.