Hi Guys! I'm having a basic difficulty, and I'm wasting a lot of time figuring out how to solve it. I created a site and enabled the Lets Encrypt SSL certificate. The domain is already working already with the certificate. However, I have the address of 2 urls Https : // www. mysite. com Https :// mysite .com How do I remove the www url and leave only the no-www? Settings Prints imgur. com / g3ibdce and imgur. com / xtoDRiD
Open the website settings, go to the redirect tab and choose www.domain.tld => domain.tld in the seo redirect field, then press save.
Thanks for the answer! Change made. Redirect Type: No redirect SEO Redirect: www.domain.tld => domain.tld Rewrite Rules: none Problem persists. I still have 2 urls. How strange, is not it?
1) Are you sure that you connect to the corrcet server? 2) If you really connect to that server, then it might be that the config could not be written. Is there a vhost.err file for this website in the sites-enabled folder of the web server config (apache or nginx)?
Take a look into the folder /etc/apache2/sites-available/. Is there a file with the file ending .err for this domain?
Sorry.... But I did not understand. As well? I'm using Nginx instead of Apache. And do you guide me to trade Apache for Nginx? Is Apache still running on the machine?
Last login: Tue May 30 22:23:59 2017 from MYIP root@server:~# ls /etc/apache2/sites-available/ 000-default.conf default-ssl.conf root@server:~# ls /etc/nginx/sites-available/ apps.vhost mysite.com.br.vhost site3.com.br.vhost mysite.com.br.vhost.err certbot roundcube.vhost default vps.vhost default.bak vps.vhost.save ispconfig.vhost site2.com.br.vhost
Sigh... I mean just change apache2 in /etc/apache2/sites-available/ to nginx i.e. /etc/nginx/sites-available/.
I noticed that the settings of the files mysite.com.br.vhost and mysite.com.br.vhost.err are different. I found it very curious. File: mysite.com.br.net.br.vhost server { listen *:80; listen *:443 ssl; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate /var/www/clients/client1/web2/ssl/mysite.com.br-le.crt; ssl_certificate_key /var/www/clients/client1/web2/ssl/mysite.com.br-le.key; server_name mysite.com.br www.mysite.com.br; root /var/www/mysite.com.br/web/; if ($scheme != "https") { rewrite ^ https://$http_host$request_uri? permanent; } index index.html index.htm index.php index.cgi index.pl index.xhtml; File: mysite.com.br.vhost.err server { listen *:80; listen *:443 ssl; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_certificate /var/www/clients/client1/web2/ssl/mysite.com.br-le.crt; ssl_certificate_key /var/www/clients/client1/web2/ssl/mysite.com.br-le.key; server_name mysite.com.br ; root /var/www/mysite.com.br/web/; if ($http_host = "www.mysite.com.br") { rewrite ^ $scheme://mysite.com.br$request_uri? permanent; } if ($scheme != "https") { rewrite ^ https://$http_host$request_uri? permanent; } The configures that are right and in the vhost.err file, correct? In vhost are not they?
ahrasis, till : Thanks for the help and patience. I deleted the domain and the vhost file. I did it again, I waited for a while and it worked.
You just didn't set the 'Auto-Subdomain' option to 'www.'. I had the same problem and then I realized that it needs the auto-subdomain to be www. for the redirection to work. I just did this with redirect option: Redirect Type: No redirect SEO Redirect: www . domain . tld => domain . tld Rewrite Rules: none and it works.