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
Complete the following prerequisites if you haven't already done so:
-
Create a WordPress instance in Lightsail. Your instance must be in a running state. To learn more, see Create an instance.
-
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.
-
Ensure that ports 22, 80, and 443 are configured on your instance's firewall to enable Lightsail Setup. Port 22 is required for Lightsail Setup to connect to your instance. Port 80 is required for domain ownership validation during certificate installation. Port 443 is required for serving HTTPS traffic after installation. To verify, open the Networking tab of your instance and check that all three ports appear in the firewall rules. To learn more, see Instance firewalls.
Note
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.
Choose the Connect tab and choose Set up your website.
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.
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.
Important
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.
Note
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,
example.com).(Optional) To also secure your www subdomain, choose Add assignment again and add your www subdomain (for example,
www.example.com).
Tip
If you skip the www subdomain, visitors who type
www.example.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.
Important
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
Your website is now configured with HTTPS and an automatic redirect from HTTP to HTTPS. You can sign in to the WordPress administration dashboard to customize your site, install plugins, and manage content.
Note
Let's Encrypt certificates will automatically renew every 60 to 90 days. If renewal fails in the future, see Certificate did not automatically renew.