non www to www r

how can i use addon domain to non www to www in cpanel

How to do this please tell . I want my website to please guide through step by step procedure

The process to force people from the www version of your site to the non-www version and vice versa is very similar to the process to force people to the https version of your site:

Just note that the .htaccess rules (if you want to use those) are slightly different. These are the rules to redirect from non-www to www:

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

And these rules do the opposite:

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