Enable HTTPS on your WordPress instance with a Lightsail managed domain
Lightsail Setup helps you quickly connect your domain to your WordPress instance. Lightsail Setup creates a Let's Encrypt certificate that automatically renews every 60 to 90 days. When the setup is complete, visitors can securely access your website using your custom domain name.
This guide applies to domains that are:
Registered through Lightsail or Route 53
Managed using a Lightsail DNS zone
If your domain is registered with a third-party registrar (such as GoDaddy, Namecheap, or Cloudflare), or your DNS is not managed using a Lightsail DNS zone, see Enable HTTPS on your WordPress instance with a domain registered outside of Lightsail.
Step 1: Complete the prerequisites
Before starting Lightsail Setup, confirm the following:
-
A running Lightsail WordPress instance. Create a WordPress instance in Lightsail. Your instance must be in a running state. To learn more, see Create an instance.
-
A domain registered through Lightsail or Route 53. Register a domain name through Lightsail or Route 53. For more information, see Register a domain in Lightsail. Also ensure the domain is verified, active, and in the same account that you are using for Lightsail Setup. See Verify the domain contact information.
-
Your instance firewall allows Lightsail Setup. Ensure that your instance's firewall allows the following traffic, so that Lightsail Setup can configure HTTPS:
SSH (TCP 22) – Must allow Lightsail Setup. Lightsail Setup uses this port to connect to your instance.
HTTP (TCP 80) – Must allow any IPv4 and IPv6 address. Let's Encrypt uses this port to validate domain ownership.
HTTPS (TCP 443) – Must allow any IPv4 and IPv6 address. Your website uses this port to serve HTTPS traffic.
To check, open the Networking tab of your instance. If the SSH rule doesn't allow Lightsail Setup, edit the rule and select Lightsail Setup access. To learn more, see Instance firewalls.
If your domain is registered with a third-party registrar, or your DNS is not managed using a Lightsail DNS zone, see Enable HTTPS on your WordPress instance with a domain registered outside of Lightsail.
Step 2: Start Lightsail Setup
Open the Lightsail console at https://lightsail.aws.amazon.com/
. Choose your WordPress instance from the instance list.
In the Getting started tab, choose Start Lightsail Setup.
Step 3: Select your domain
Choose Lightsail managed domain.
Select your domain from the dropdown list.
Your domain appears in this list if it is registered through Lightsail or Route 53 in the same account that you are using for Lightsail Setup.
Your domain must be in Registered status for Lightsail Setup to work.
Step 4: Configure DNS
A DNS zone manages the DNS records that direct traffic for your domain to your instance. Lightsail Setup requires a Lightsail DNS zone to automatically create and manage these records for you.
Choose Lightsail DNS zone.
-
Lightsail Setup checks if a Lightsail DNS zone already exists for your domain:
If a DNS zone exists – Lightsail Setup displays it. Choose Use this DNS zone.
If a DNS zone does not exist – Choose Create DNS zone. Lightsail Setup creates the DNS zone for your domain.
To route traffic to your instance, your domain's name servers must point to your Lightsail DNS zone. If they don't match, update your name servers before continuing with Lightsail Setup. For instructions, see Change the name servers at your domain registrar.
To verify your name servers are pointing correctly and have propagated globally, check
DNS Checker
You can also verify from the command line:
macOS and Linux:
$dig NSyourdomain.com+shortWindows:
C:\>nslookup -type=NSyourdomain.com
The result should show your Lightsail DNS zone's name servers (for example,
ns-123.awsdns-01.com). You can find your DNS zone's name servers on the
Domains & DNS > DNS zones page in the
Lightsail console.
Name server changes can take up to 48 hours to propagate. If Lightsail Setup fails after updating name servers, wait and try again.
Step 5: Configure a static IP
A static IP address provides a fixed public IP for your instance. Without a static IP, your instance's IP address can change if you stop and restart it, which breaks your domain's connection.
Choose one of the following:
Create a new static IP – Enter a name for your static IP and choose Create static IP.
Use an existing static IP – If you have an unattached static IP in the same AWS Region, select it from the list and choose Attach static IP.
After this step, Lightsail Setup attaches the static IP to your instance.
Step 6: Add domain assignments
Domain assignments are DNS records that direct traffic for your domain to your instance.
Choose Add assignment.
Add your apex domain (for example,
exampletest.com).(Optional) To also secure your www subdomain, choose Add assignment again and add your www subdomain (for example,
www.exampletest.com).
If you skip the www subdomain, visitors who type
www.exampletest.com will not reach your site. Add it if you want both
addresses to work.
Step 7: Create SSL/TLS certificate
Select the domains and subdomains you want to secure with HTTPS. You can choose up to 10 domains and subdomains.
Enter your email address. This is used for certificate renewal notifications.
Select I authorize Lightsail to configure a Let's Encrypt certificate on my instance. This gives Lightsail restricted access to create and configure the certificate on your instance.
Choose Create certificate.
Lightsail Setup begins configuring HTTPS on your instance. This process takes up to 15 minutes.
If setup fails, see Lightsail Setup failed for troubleshooting steps.
Do not stop, reboot, or modify your instance while setup is in progress.
Step 8: Verify your website
After Lightsail Setup completes:
Open your browser and go to
https://.yourdomain.comConfirm that your website loads successfully.
(Optional) Test
https://www.to confirm both addresses work.yourdomain.com
To confirm that your website uses the certificate that Lightsail Setup created, view the certificate in your browser. For example, in Google Chrome:
In the address bar, choose the site information icon to the left of the URL, and then choose Connection is secure.
Choose Certificate details.
Confirm that the certificate is issued to your domain. Under Issued By, confirm that Organization (O) is Let's Encrypt.
Your website is now configured with HTTPS and an automatic redirect from HTTP to HTTPS.
Let's Encrypt certificates will automatically renew every 60 to 90 days. If renewal fails in the future, see Certificate did not automatically renew.