Type
as Permanent ( 301 ).base domain
from the dropdown ( E.g: example.com )redirects to
put full URL ( E.g. http://www.example.com )www. redirection
Do Not Redirect www.Wild Card Redirect
box ( If you not check this box then http://example.com/`*` will not redirect too http://www.example.com/`*`)Add
Congrats now
http://example.com
will redirect to http://www.example.com
http://example.com/anything
will redirect to http://www.example.com/anything
Note: If you have SSL certificate installed then use https in Step 4.
You can force "www" on your domain name using the cPanel Redirects feature. Here are the steps:
Log in to your cPanel account.
Find the "Domains" section and click on "Redirects".
In the "Redirects" section, select "Permanent (301)" as the type of redirect.
In the "Source URL" field, enter your domain name without "www". For example, "example.com".
In the "Destination URL" field, enter your domain name with "www". For example, "www.example.com".
Select the option to apply the redirect to all subdomains.
Click on the "Add" button to create the redirect.
After the redirect is created, any visitors to your site using the non-www version of your domain name will be automatically redirected to the www version. This will ensure that all traffic to your site goes to a single, consistent URL.
Note: This method of forcing "www" does not require editing the .htaccess file and is a simpler way of achieving the same result.