Tutorials and hands-on lessons for learning

Netlify

Netlify is a platform that offers cloud hosting and serverless back-end services for static websites. With Netlify you can either work from a GitHub repository, or by uploading data directly to the platform. Netlify is like GitHub, but has a lot more capabilities to work at scale. The service allows for asset bundling, caching, development site testing, and has high rate limits.

Note: The default root URL for websites published using Netlify is: customname.netlify.app.

Create a Netlify account

Create a Netlify account. Choose your preferred signup: GitHub, GitLab, Bitbucket, or sign up using your email.

Option 1: Create a new site using project files

To deploy a new site using files stored locally, go to the ‘Sites’ tab in Netlify. Next, drag and drop your project folder in the box labeled ‘drag and drop your site folder here’. Files must be stored in a folder, as Netlify does accept individual project files.



After you have successfully uploaded your project folder, your project will be assigned a default URL and you will be directed to the deployment overview page.

The final step is to change the site name. Select ‘Site Settings’. Under ‘Site Information’ select ‘Change site name’ and input a new name for your project site.

Option 2: Create a site using GitHub or another version-control tool

With Netlify, you can deploy a site by linking directly to GitHub Link (or supported version-control tool of choice).

Create new site from Git

Under ‘Sites’, select ‘New site from Git’.

Select a Git provider

Next, select the Git provider where your site’s source code is hosted (GitHub, GitLab, or Bitbucket). In this example, we will be using GitHub. Once you’ve selected a Git provider, you will be prompted to allow Netlify to access your GitHub repositories. Netlify doesn’t store your GitHub access token on their servers. If you’d like to know more about the permissions Netlify requests, you can visit their documentation on Git provider permissions.

Select a repository

After connecting to your GitHub account, choose the repository you want to link to your site on Netlify.

Configure your settings

If you are not using a static site generator or build tool, click ‘Deploy site’.

If you are using a static site generator or build tool, then you will need to configure the following settings to build your site:

  1. Add your build command (e.g. npm run build)
  2. Make sure that your publish directory is where your public site files are placed after building the sites.
  3. Click Deploy site

Once your site is deployed, the final step is to change the site name. In Netlify, select ‘Site Settings’. Under ‘Site Information’ select ‘Change site name’ and input a new name for your project site.

Was this page helpful?