Search Our Database
How to Add WWW to Your Website Using .htaccess?
This guidance will go through the step of configuration.
Prerequisites
- SSH access to server
- Knowledge on Linux command
- SSH into the server.
- Type command below to gain root access.
sudo su -
- Locate your website folder (public_html).
- Edit the .htaccess and add in below line. You may create new .htaccess if you currently didn’t have it.
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
- Your website URL should be showing WWW now.
Conclusion
By following the guidance above, you should have managed to configure your website URL to show WWW.
For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.