Reputation: 371
I have configured domain setting to open my website on www.websitename.com and with only websitename.com. I am using https on aws loadbalancer and it is a django website. The problem is website opens fine when opened with https://www.websitename.com but when I open is with https://websitename.com it opens the website but with message saying connection is not secure.
Django Settings File.
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
Could someone help to figure out the problem I am not sure if it's the aws or some configuration error in settings file.
Good: https://www.websitename.com
Connection Error on: https://websitename.com
Thanks.
Upvotes: 0
Views: 764
Reputation: 26
Have you defined websitename.com in the list of subject alternative names (SANs) of your certificate? You should put both names in your list of domains.
Upvotes: 1