cross-posted from: https://lemmyfly.org/post/2382

thanks to @Hopfgeist@feddit.de for noticing www.lemmyfly.org was not secured and not pointing to the lemmy instance.

Checking the lemmy ansible files I saw your nginx configuration file is located in /etc/nginx/sites-available/[sitename].conf

To add a redirect for your www.[sitename, add: (lemmyfly.org example)

server {
  server_name www.lemmyfly.org;
  return 301 $scheme://lemmyfly.org$request_uri;
}

check your config with sudo nginx -t

restart nginx: sudo systemctl restart nginx

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    1 year ago

    You’re nicer than I am. If someone’s still typing “www” into the URL bar, I make certain assumptions about them with my site’s Nginx config:

    server {
      server_name www.dubvee.org;
      return 301 https://aarp.org;
    }
    
      • Admiral Patrick@dubvee.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        Not as brutal as calling customer service for something and having their hold announcements read their website address to you on a loop:

        “For faster service, please visit our website at double-you double-you double-you dot blah blah dot com. Again, that’s double-you double-you double-you dot blah blah dot com.”

        And if you go to that address, it redirects you without the “www”. :facepalm:

        Worst part is that if I could have solved the problem through the website, I would have. Calling support is like a last measure of resolution.