Correct way to redirect www to non www Ubuntu 14.04 VPS?
I have searched on here for the answer for my questions, but seem to get varied responses.
I would like to know the best practice to redirect the www version of my site to the non www version.
I have already created the CNAME record as below:
CNAME www @
This works fine, but I get a redirected warning in Google Webmaster Tools where on my previous host it worked fine. (Maybe this isn't an issue?)
I have checked my old .htaccess of my previous host (SiteGround) and it was not being redirected from there.(They also had the CNAME record for www) So this has lead me to believe that will need to be created as a virtual host in apache as well?
In /etc/apache2/ there is apache2.conf which seems to be my current settings as /etc/apache2/sites-available only includes the files 000-default.conf and default-ssl.conf which both have no virtual hosts referencing my server.
So my question is what do I have to do next, if anything?