Enabling a tls certificate for my domain on a wordpress lightsail doesn't work properly

0

So I want to enable https for my domain. I went through the process of creating, validating and viewing my tls certificate with respect to a distribution on the lightsail console.

My distribution is enabled. Its origin is pointing to the static ip address for my lightsail instance. It says my distribution pulls from http only. When I go to the custom domains section i can see the three domains for which i requested encryption. For each it says in the status: "Domain not registered to account". What does that mean? There is one attached certificate, whose status is: "Valid, in use". Then, my default domain is something like 12345abcdef.cloudfront.net. At the Distribution management site it says default domain is the latter and custom domain is my www.example.com and two more for which the certificate was issued. In the Domains & DNS section I have one global zone sitting that handles all the records. Name servers are pointing to aws as they should and at godaddy i also added the aws domain names. And the a records of the three domains (and subdomains) are pointing to the static ip. And all that works for http.

But the https site fails to load. Should I assign something somewhere? Set some CNAME records? What do i put in the resolve to?

What I have done now is to change the Domain assignments. So my main domain example.com and www.example.com are now resolving to my distribution. The effect that it has, is that the side now can be visited with https, but the html elements are all weird, like there is no css styling, just plain html. What is going on?

1 Answer
0

Hi,

If you only need HTTPS for your wordpress instance, you can follow the document below to enable https on your lightsail wordpress instance using the bncert tool on the host itself without a distribution.

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-enabling-https-on-wordpress

If you would like to use a distribution for the performance benefits, your DNS configuration seems correct. However, you might need to update some wordpress settings for it to become compatible with the distribution. The below guide should help.

https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-editing-wp-config-for-distribution

AWS
Varun_R
answered 2 years ago
  • Hi, I have configured wordpress instance to use https following the docs you provide. Now I also want to connect a cloudfront distribution to improve performance, but after connect the distribution and have setted https only it returns a 502 error saying The request could not be satisfied.

    I have already done the wp config edit for cloudfront distributiondescribed in the link you provide.

    is there any way to configure a distribution after have setted HTTPS on wordpress instance?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions