Creating a wildcard canonical redirect which redirects any request that doesn't have the www to the www (useful for Search Engine Optimisation) can be easily achieved in your cPanel.
The first step is to log into your cPanel account. If you are unsure on how to do this, please view the following help article - 'How to log into cPanel'.
Under the 'Domains' title, click onto 'Redirects'.
Select and enter the respective information for the redirect.
- Type - Choose 'Permanent(301)' .
- http://(www.)? - Select the domain from the drop down menu.
- / - Enter just the old page URL that follows your domain name. For example if you want a redirect from http://www.your-domain.com/old-page, enter just 'old-page'.
- Redirects to - Enter the full domain where you want the redirect to go to - the exact domain will need to include http:// or https://.
- Redirection type - Select your redirection preference.
- Wild Card Redirect - Tick this option.
Once you have entered the redirect information, select 'Add' to complete.
This process will perform a wildcard 301 from non www to www. Search Engines will automatically pick this up next time it crawls your site and update automatically, so no need to submit your site again.