Using Netlify to host a static website

suryawiguna

Surya Wiguna

Posted on August 9, 2020

Using Netlify to host a static website

When you created a static website, whether it's a project with client or just for portfolio, you usually want to make it online. One of modern hosting especially for a static website is Netlify. Netlify is nice to hosting from a very simple web, or generated website using Gatsby or Gridsome, and it's free to get started. There are very simple steps to host your website to Netlify.

Netlify Logo

1. Sign Up

You can sign up with your GitHub, GitLab, or Bitbucket account to easily connect your repository later.

Signing Up

2. Select Git provider

After you sign up, you can start to deploy your website. First select the git provider where you put your website project. Select one and authorized Netlify to access your repository list. I personally use GitLab.

Select Git Provider

3. Select Repository

Now after you authorized Netlify to your git provider, all your repository will showed up. Select which repository that you want to deploy.

Select Repository

4. Setting the build option

You can choose which branch that will deployed to the hosting, so it's not always have to master branch.

Build Options

If you deploying a generated site with such as Gridsome, you need to add gridsome build in Build Command, and dist in Publish directory to automatically start building the website right after you push to the branch that you choose to deploy before.

Additional settings

And that's it! Now your website is published and can access via internet with yourwebiste.netlify.app domain. You can use your custom domain by setting the DNS configuration. Read the official documentation to know more how to do that. From now, when ever you want to make a change to your website, just push your change to the branch that you choose and Netlify will build the change for you. Thank you for reading :)

πŸ’– πŸ’ͺ πŸ™… 🚩
suryawiguna
Surya Wiguna

Posted on August 9, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related