Problem:
There are issues on the difference between having “www” ahead of our url/domain of our website ( canonical url ) and without “www” on SEO area. So I am going to show you a simple way of redirecting your domain that has no www or adding www to your domain using CPanel.

Solution:

1. Login to your cPanel.
2. Navigate to the Domains block of menu.
3. Click Redirects icon inside the Domains bar.
4.

Type: Permanent (301)

http://your-domain.com

redirects to  http://www.your-domain.com

Choose “Do not redirect www.

5. Save

and test it.

Hope that helps.