The www and non-www URLs for your domain can be made to redirect people to each other. In the.htaccess file, a cPanel user can add a directive to redirect from www to non-www URLs or the other way around. Keep reading to know more.
- Login to cpanel.
- Now find the “FILES” section and click on “FILE MANAGER” option.
- Now click on “public_html” directory.
4. In the ‘public_html’ directory, right click on “.HTACCESS” file and choose the “EDIT” option.
- Now add the following lines in the .htaccess file. And save it.
( Note – Replace the domain.com, to you desired domain name )
Last Update: July 26, 2022