Get a free Domain name and setup SSL on your Server

Ahiwe Onyebuchi Valentine
3 min readJan 28, 2020

--

You’ve reached that point where you’ve built your app and deployed it but you don’t want to be having a discussion with a friend and when asked for a link to the app, you give an IP address. This article shows you how to get a free Domain name and setup SSL so that your site will be secure.

Prerequisites

You’ll need a VPS. You can get one on AWS or GCP. I’ll be using AWS in this article. You can refer to my article on setting up a VPS on AWS and also deploying a Django/Flask Application on a VPS.

Step 1: Visit Freenom.com

Update April 2020: Looks like Freenom have removed their SignUp page. If you already have an account, you can still create free domains. You can visit the link mentioned in the comment by Saurabh for another solution.

Freenom allows you check for the availability of domain names and get them if they are available. You can get some domain names for free especially the ones that end with .ml, .ga e.t.c while some others like .com, .org e.t.c. have to be paid for.

Freenom.com

Create an account with them, sign in and check for the availability of a domain name of your choice.

Domain names

I’m searching for paygo. I’ll go for paygo.cf since it is free. After clicking get it now, click the checkout button at the top. Choose 12 Months @ Free to get the domain free for 12 months.

Checkout

Click Continue. Agree to Terms and conditions. Click Complete Order.

Once your order is complete, Click Services and open My Domains to view the domain you just bought.

Domain List

Click Manage Domain to connect the Domain name to your VPS. Click Manage Freenom DNS to input the public IP address of your VPS instance. On AWS you can get it on the EC2 Instances page.

IP address of VPS

Once you get the IP address, input it in the DNS records.

DNS Management Page

Save your changes. It takes some hours for the DNS registry to be updated with this changes.

Now that you have your Domain name, if you’re using Nginx as your proxy server you can replace the server_name line in your configuration file:

// Remove 
# server_name <DOMAIN>;
// Replace with
server_name paygo.cf;

This should be done before adding SSL to the site.

Step 2: Add SSL to Domain

For the adding of SSL to a site, I make use of Certbot. They have configurations for different servers and Operating Systems. Visit them and see if they fit your need.

Congrats!!!

Hopefully you host more projects in the cloud with this info. Goodluck with your deployments.

REFERENCE Links:

1) Freenom: http://freenom.com

2) Certbot: https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx

3) Learn Linux: http://linuxcommand.org/lc3_learning_the_shell.php

--

--

Ahiwe Onyebuchi Valentine
Ahiwe Onyebuchi Valentine

Written by Ahiwe Onyebuchi Valentine

Valentine Ahiwe is a DevOps Engineer with a pro-level knowledge of AWS architecture.

Responses (1)