Question

website not redirecting to www.

Posted December 14, 2018 889 views
DNSUbuntu 16.04

My website loads fine at both “example.com” and “www.example.com” however I want it to always redirect to “www.example.com” everytime I believe I have my CNAME configured correctly as the HOSTNAME “www.example.com” is an alias for “example.com”

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hey friend,

This can be done in a .htaccess file if mod_rewrite is enabled.

https://www.siteground.com/kb/how_to_redirect_nonwww_urls_to_www/

Jarland