How to remove allow requests without www such as when linking site?
June 21, 2021 11:00AM
I have it setup so that non-www requests redirect to www, however when I link the domain, say, in Discord with https://my-domain.com or if I type it out in the browser like that it doesn't work, it says This site can't be reached. Is there any way I can fix that?

This is the block I have in my /etc/nginx/sites-enabled/default file to redirect www requests

server {
server_name www.my-domain.com;
return 301 $scheme://my-domain.com$request_uri;
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready