How to redirect visitors that specify a non-WWW web address to a WWW web address.
ATTENTION: If you do not have experience in working with .htaccess files, contact our support team for assistance to avoid potential harm to your website.
What you need
- An existing, enabled .htaccess file for your domain. For instructions, refer to How to create .htaccess files
- A back-up of your .htaccess file
Method
Open your .htaccess file located in your document root directory, /html.
- Copy and paste the code below into the file, but replace <example.com> with your actual domain name without the angled brackets.
RewriteEngine On RewriteCond %{HTTP_HOST} ^<example.com> RewriteRule ^(.*) $ http://<www.example.com>/$1 [R=301,L]
For 24-hour assistance any day of the year, contact our support team by email or through your Client Portal.