Free web hosting for static website with custom domain name

Balram Chavan
1 min readJan 25, 2019

Do you have your custom domain name bought and have a static website which you would like to host it for free? Yes, for real free without advertisement!

Thanks to surge.sh to make it happen.

Steps:

  1. Install late version of Nodejs
  2. Install surge-cli by running command:
npm install --global surge

3. Now login to your custom domain provider account (e.g. GoDaddy, NameCheap, 1and1 etc) and go to DNS setting page for CNAME setup.

a. Add a new CNAME record to your domain.

b. Set the hostnames @ and www to:

na-west1.surge.sh 

Here is the detailed instruction about setting up CNAME for surge.sh

Deploying to your custom domain

Now you’re ready to deploy your project to your custom domain. With the Surge command line tool installed, you could run the following command:

surge path/to/my-project my-custom-domain.com

And that’s it!

After some time, you can visit to your <custom-domain-name> and it should load website from surge.sh.

Here is the detailed instruction.

Cheers!!!

--

--