Previously, I’ve written about Amazon LightSail, a Virtual Private Server (VPS) offering, built on top of secure, reliable, and scalable AWS infrastructure. If you are new LightSail, I’ll recommend to read the previous post, as we will be building on top of that learning.
In the previous post, we covered the VPS basics, a little bit of AWS Lightsail introduction and few of its use cases. As part of that learning, we also demo installing and spinning up a WordPress website and we were able to access it using its dynamic public IP address.
In this post, we will take one step further and see how we can associate a custom domain and setup SSL for our WordPress website running on Lightsail.
I’ve bought a custom domain ( mgarh.pk) from an external domain provider, you can use any provider and in most cases they all work in sort of similar way, select whichever provider you prefer to buy a domain name. So, I’ll be using mgarh.pk domain and will associate it with the WordPress website running on Lightsail server.
Following are the topics we will cover in this post:
- Create a public Static IP Address for Lightsail instance.
- Create a DNS Zone.
- Associate DNS Zone and public Static IP Address.
- Configure Nameservers for custom domain.
- Enable HTTPs on Lightsail WordPress server .
Static IP Address
In previous post, we saw that we can access the WordPress website using its dynamic public address:
However, Dynamic public IP addresses attached to our LightSail instance will change whenever we start/restart the instance. This is of course not useful for our requirement. We need a static IP address, which doesn’t change with instance state and we will associate it to a custom domain in later step.
We can easily create and attach a public static IP address to our instance from Lightsail console by click of a button. Following picture shows the…