How to Point Your Domain Name to Your AWS Lightsail Bitnami WordPress Website

This tutorial will teach you how to point a domain name purchased from a domain name registrar other than AWS Route 53 to your Bitnami WordPress site created through AWS Lightsail.

Prerequisites

  1. You have the public IP address for your website from the AWS Lightsail console – see How to Create a WordPress Blog using AWS Lightsail
  2. You have purchased a domain name for the site and you have access to the domain registrar’s admin area to change Domain Name System (DNS) settings

Pointing your domain to your website

Step 1 – Login to AWS Console and go to Route 53

Step 2 – Click on Hosted Zones and create a hosted zone with the domain name you have purchased – enter it without the www

Step 3 – Select the type as a public hosted zone

Step 4 – You will see a type NS with four entries like ns-95-awsdns-11.com in the Value column, make a note of them

Step 5 – Create a subdomain for the www prefix by entering the following in the Create Record Set area on the right-hand side:

  • Type: A – IPv4 address
  • Alias: Yes
  • Alias Target:  select your domain name
  • Routing Policy: Simple
  • Evaluate target health: No

Step 6 – Login into the domain registrar’s admin panel i.e. where you bought your domain name

Step 7 – Select the domain you want to manage

Step 8 – Go to Manage DNS Settings or similar

Step 9 – Change the Name Servers to the AWS name servers noted in Step 4.  There may be two default settings but you need to overwrite them and add two more so it shows the four namespace servers from AWS

Step 10 – Save the settings and wait for a few minutes, your website should now appear when you put its URL in the browser.

How to add a SSL Certificate to an AWS Lightsail Bitnami WordPress Site

Now you’ve created your new Bitnami WordPress site using AWS Lightsail the first thing you will see when viewing it in Google Chrome is a ‘Not secure’ warning message next to the URL – a sure-fire way of scaring your visitors away!

Here’s a step-by-step guide to fixing the problem:

Step 1 – Purchase a SSL Certificate

AWS offer free certificates but you need to use their CloudFront Content Delivery Network and a pricey Elastic Load Balancer.  It’s also quite complicated to set up. If your site is new and hasn’t much traffic then the only option is to buy a certificate from a Certificate Authority.  Try GoDaddy.com or 1&1.co.uk.



Step 2 – Once you have purchased a certificate, your provider will need a CSR (Certificate Signing Request) before you can download the certificate. This is to link the certificate to your domain name and server.

To do this, you need to SSH into your AWS instance using the ‘Connect using SSH’ button in the instance console in Lightsail.

A window will open and you should see the Bitnami terminal or Command Line Interface (CLI) with the cursor next to a bitnami@ip-xxx-xx-x-xxx:~ $ prompt.

How to add a SSL Certificate to an AWS Lightsail Bitnami WordPress Site
Click the ‘Connect using SSH’ button

Step 3 – Create a CSR and follow the instructions on your certificate supplier’s website on copying and pasting it into your certificate application form – see How to Create a CSR.

Step 4 – You will now need to verify your site by either uploading a file or adding a TXT record to your DNS settings.  Again, your certificate supplier will have instructions on what to do.

Step 5 – When the site’s verified,  follow the instructions to download the certificate from the certificate supplier’s website to your computer.

Step 6 – Install the certificate and bundle to the server

Step 7 – Change the conf file

Step 8 – Restart apache

Step 9 – Check everything is working – close the browser and type the url using https:

Step 10 – Do a mod rewrite to redirect http traffic to https

How to Create a WordPress Blog using AWS Lightsail

In the old days creating a WordPress blog site involved setting up a LAMP server, downloading the latest version of WordPress from WordPress.org and installing the software.  Today, creating a new WordPress site is a breeze with Amazon Web Services (AWS) Lightsail.

Step 1 – visit AWS Lightsail

Step 2 – Click on ‘Get started for free’

How to set up a WordPress Blog using AWS Lightsail
Click on ‘Get started for free’

Step 3 – Create a new AWS account or sign in if you have one already

How to set up a WordPress Blog using AWS Lightsail
Create a new account or sign in

Step 4 – Click on Create Instance

How to set up a WordPress Blog using AWS Lightsail
Click on ‘Create instance’

Step 5 – Choose an instance location – US, UK or in any of the other AWS regions

Step 6 – Choose Linux/Unix platform

Step 7 – Select the ‘WordPress’ Blueprint

How to set up a WordPress Blog using AWS Lightsail
Select a location, select the Linux platform and the WordPress blueprint

Step 8 – Select a plan – you can start with a small server and scale up when traffic to your new WordPress site increases.

Step 9 – Name your instance

Step 10 – Click ‘Create’

How to set up a WordPress Blog using AWS Lightsail
Select a plan, name your instance and click ‘Create’

Step 11 – Wait for the instance to create

How to set up a WordPress Blog using AWS Lightsail
Wait for the instance to create

Step 12 – When the  instance is running you will see a public IP address. Enter the IP address in a browser and your new WordPress site will appear

How to set up a WordPress Blog using AWS Lightsail
Site is running with a public IP address

Step 13 – View your site and follow the instructions to get access to the site back-end

How to set up a WordPress Blog using AWS Lightsail
Click on the ‘Bitnami’ logo to view the instructions to get access to the site admin area

 

Related Articles

How to add a SSL Certificate to an AWS Lightsail Bitnami WordPress Site