How can I configure nginx so the bare non www domain redirects to www after adding the site. Thanks!
to redirect all your non www domain to www, create this extra vhost in /etc/nginx/conf.d
server_name "~^(?!www\.).*" ;
return 301 $scheme://www.$host$request_uri;
I don't get this working... I'm using sll ... and it is always forwarded to https://domain.name instead of https://www.domain.name ... any futher hint?
Thanks for your advice
Hello meierj, you may have to edit the file /etc/nginx/conf.d/forcessl-yourdomain.tld.conf because it will redirect http traffic to https without www by default.
@meierj after updating an nginx conf file you need to do sudo service nginx reload and give it a minute or two
sudo service nginx reload
After finishing installation, I tried to GTMetrix and this the scenario, how to resolve the following issue?
Avoid landing page redirects for the following chain of redirected URLs.
Can you please help me to resolve the issue?
abdulrehman What is the issue? It looks like the redirect is working correctly for you.
I have resolved the issue.
Thanks for your attention.
Hosted by VirtuBox