Redirect example.com to www.example.com VPS & Apache2
- by Thomas Buckley
I have a VPS and a domain name registered with the provider.
When I enter www.example.com my site is displayed correctly, but entering example.com does not work. I am able to ping www.example.com.
I added the following line to my apache2 default vhosts file:
ServerName example.com
ServerAlias www.example.com
But this did not work.
The VPS is…