You can fix www vs non-www canonical issue by using 301 domain redirect feature on Hostgator cPanel. Below are the simple steps on how to redirect a domain on Hostgator cPanel.
Redirecting a non-www domain to www
- Login to your Hostgator cPanel
How to Loin to Hostgator cPanel
- Fill the data as shown in below figure
- Select Type as “Permanent (301)”
- Select the domain which you want to redirect
- Enter domain name with www. Don’t forget to add http:// before www
- Select “Do Not Redirect www.”
- Click on “Add” button
Done. Now you can open the site without www in any browser and check it redirects to site with www. It works.
Redirecting a domain to another domain or URL
If you want to redirect the domain to any other domain
- Select “Permanent (301)”
- Select the domain you want to redirect
- Enter the domain name (with or without www) starting with http://
- Select “ Redirect with or without www”
- Click on “Add” button