How to Do WWW Resolve

WWW Resolve Image

WWW resolve is the best practice for solving the duplication problem on your own website by using server’s configuration file to either force www or without www before the domain name.

This simply mean that when you enter your website address with www or without www it will bring you to the same URL. For example: you navigate at, it will redirect to and when you navigate  at, it will redirect to the same address

Search engines see and as two different URLs. For best SEO practice, you need to choose one whether using www or without www before your domain name.

Some people think that including www will make it look more visually appealing and help to identify the URL better. Other people thinks that not to include www will make the URL shorter and look cleaner. The decision is based on your preference.


Implementing www resolve is simple. First, you need to locate your root directory in your server and open .htaccess file (you need to create one if you do not found any) using your prefer HTML editor such as Notepadd ++. Then choose whether you want to include www before your domain name or not. And then add the following code into you htaccess file.

WWW Resolve with WWW

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

WWW Resolve without WWW

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Final step is saving your .htaccess file.