I am trying to make my websites www. redirect to https://

I am building a website https://carrickrowingclub.ie and I created a www in my DNS config I installed the sub-domain as a URL and the installed a lets encrypt cert. What do I do so it redirects? Really would appreciate any help at all!

Well, what did you put in your DNS conf for www ?

Iā€™m not a DNS expert, but I think you can either have a A record pointing to the same IP than carrickrowingclub.ie, or a CNAME poiting to carrickrowingclub.ie (i.e. the domain, not the IP)

Go to the /etc/nginx/conf.d/www.carrickrowingclub.ie.d/carrickrowingclub.conf and paste the following lines.

location / 
    {

        #implemented by default, change if you need different ip or port

        #listen *:80 | *:8000;


        return 301 $scheme://carrickrowingclub.ie$request_uri;

    }

Reload nginx:
service nginx reload

1 Like

Thank you very much it is amazing thank you !!
:seedling: :kissing_heart: