How to configure HTTPS and get a Free SSL for your AWS website using Cloudflare

by | Sep 17, 2022

🎯 What’s the goal?
Get a free SSL Certificate for your website using Cloudflare and HTTPS.
⚠️ Why does it matter?
Using HTTPS is an important ranking factor for SEO.
🏁 What’s the result?
By default, your website is using HTTPS (SSL).
⌚ When do you do this?
Ideally as soon you put your website online, only once.
βœ… Any special requirements?
You need to have your own domain name (SOP005).
πŸ™‹β€β™‚οΈWho should do it?
Owner of the website or the person in charge of managing it.

πŸ‘‰ Where this is done: On Cloudflare.com.

⏳ How long will this take? about 20 minutes

Β Let’s get started, in 20 minutes your website will be more secure.

Environment setup:

  • We recommend that you use the Google Chrome browser to navigate the web.
  • Access to your Amazon Web Services (AWS) account,
  • Access to your domain setting.

Creating an Account on Cloudflare.com

  • Enter your β€œEmail” address.
  • Then come up with a β€œPassword” – it needs to fulfil the criteria underneath.
  • Finally, click on β€œCreate Account”.

After creating your Cloudflare Account go check your email.

 You should receive one from Cloudflare to verify your Email.

Open it and click on the provided link to finish the verification.

Logging into Cloudflare and connecting your website with it

  • After verifying your email address go back to www.cloudflare.com.
  • Click on β€œLog In”.
  • Enter your β€œEmail” and β€œPassword” and click on β€œLog in”.

If you already added your website to your account and connect your domain with it you should skip directly to the section β€œSet up security and speed configuration for your website” of this SOP.

  • After you log in you should see that β€œYou currently don’t have any websites”.
  • Click on β€œ+ Add Site”.
  • Enter your site (the domain you bought – e.g. β€œsitename.com”).
  • Then click on β€œAdd site”.
  • Choose the β€œFree” plan.
  • Then click on β€œConfirm plan”.
  • Now you should see DNS records for your domain. You have to change highlighted β€œValue” to your website’s Public IP address. Leave this page open in your browser.
  • Go to aws.amazon.com. (in another tab of your web browser)
  • Click on β€œSign In to the Console”.
  • Enter the Email address you used to create your Amazon Web Services Account (Make sure you selected β€œRoot user”).
  • Enter your AWS account password and press β€œEnter” on the keyboard or click on β€œSign in”.
  • After signing in choose β€œEC2” under β€œCompute” services.
  • Then click on the β€œInstances” on the left side of the page.
  • And there at the bottom of the page, you should see the β€œDescription” tab and your β€œIPv4 Public IP”.
  • Copy your β€œIPv4 Public IP”.
  • Go back to β€œCloudflare” and paste it in the place of highlighted value.
  • After editing it should look like this (of course with your personal β€œIPv4 Public IP”).
  • Click on β€œContinue”.

Changing your nameservers

  • After clicking on β€œContinue” you will be presented with new β€œnameservers” for your domain. For this SOP we bought a domain on GoDaddy.com so we will show how to change your β€œnameservers” on Godaddy.com. Cloudflare will always tell you which β€œnameservers” must be replaced no matter where you bought your domain. The option to manage β€œnameservers” will always be under β€œDNS” settings.Β 

For the purpose of this SOP, we will operate on a domain from GoDaddy.

Check our SOP005 to find out how to buy a domain.

  • Leave Cloudflare open and in another tab of your browser go to godaddy.com.
  • Click on β€œSign In”.
  • Enter your account data and click on β€œSign In” or choose to sign in with β€œGoogle” if you used it to create an account on GoDaddy.com.
  • After you sign in you should see the domain that you bought. Click on β€œDNS” to access DNS settings.
  • Now you should see β€œNameservers” page. Click on β€œChange”.
  • Then β€œEnter my own nameservers (advanced)”.
  • Now you should see two boxes called β€œNameserver 1” and β€œNameserver 2”. Leave this page open.
  • Go back to Cloudflare.com and copy β€œNameserver 1”.
  • Now go back to GoDaddy.com and paste it into the β€œNameserver 1” box.
  • Now you should do the same for β€œNameserver 2”. Go back to Cloudflare and copy β€œNameserver 2”.
  • Then go back to GoDaddy.com and paste it into the β€œNameserver 2” box.
  • Click on β€œSave”.
  • After saving, refresh the GoDaddy.com page.
  • And as you can see your domain now is β€œUsing custom nameservers”.
  • After that go back to Cloudflare.com and click on β€œDone, check nameservers”.

Set up security and speed configuration for your website

If you connected your website with your domain using Cloudflare earlier, to enter SSL configuration you have to choose β€œSSL/TLS” after logging in to your Cloudflare account and selecting your site.

If you performed previous steps from this post, you will be automatically redirected to SSL/TLS setting after you clicked β€œDone, check nameservers”.

  • Choose β€œFlexible”.
  • Then click on β€œEdge Certificates” tab
  • And make sure the switch is β€œOn” next to the β€œAlways Use HTTPS” option.
  • Finally, you can go to β€œSpeed” (1) in the β€œOptimization” (2) tab
  • Check all boxes within the β€œAuto Minify” option.
  • Then set the β€œBrotli” option β€œOn”.
  • Finally, click on β€œDone”.

Note that now DNS settings of your domain are managed by Cloudflare, so if you have to edit any of your DNS records in the future you will have to do it on your Cloudflare account.

Checking if your domain is secured and correctly assigned to your website

  • Enter your domain into your web browser and press β€œEnter” on your keyboard.
  • You should be connected to your website. Now click on the padlock at the left side of your website address, and here you can check if it is SSL Secure

You’re all set! Your domain is connected to your website and now your website is secured with an SSL certificate. Your website is now ready to welcome your audiences.

How to configure HTTPS and get a Free SSL for your AWS website using Cloudflare

🎯 What’s the goal?Get a free SSL Certificate for your website using Cloudflare and HTTPS. ⚠️ Why does it matter?Using HTTPS is an important ranking factor for SEO. 🏁 What’s the result?By default, your website is using HTTPS (SSL). ⌚ When do you do this?Ideally as soon you put your website online, only once. βœ… […]
You May also Like: