
How to Deploy Your Simple Static Website on Netlify for Free
If you've created your first static website and are ready to share it with the world, deploying it on a free, beginner-friendly hosting platform is the next step. In this guide, we'll cover how to deploy your static site on Netlify, a platform known for its ease of use and beginner-friendly setup.
Step 1: Prepare Your Website Files
Before you begin, ensure you have all your website files organized in a single folder. These files might include:
index.html
(the main page)- Any additional HTML pages
- CSS stylesheets (usually in a folder called
css
orstyles
) - JavaScript files
- Images, icons, or other assets
Note: Ensure that the index.html
file is in the root of your folder, as Netlify will look for this file to start displaying your site.
Step 2: Sign Up on Netlify
- Go to Netlify.
- Click on Sign Up in the upper-right corner.
- Choose your preferred sign-up method (you can use GitHub, GitLab, Bitbucket, or email).
- Follow the steps to complete your registration.
Step 3: Start a New Site
After signing up:
- In your Netlify dashboard, click Add new site.
- Select Import an existing project. Here, you’ll have two options:
- Drag and drop your website files directly into Netlify.
- Connect to a Git provider if your site’s code is hosted on GitHub, GitLab, or Bitbucket.
Option A: Deploying by Dragging and Dropping
This method is best for beginners who are not using version control.
- On the "Add new site" screen, choose Deploy with drag and drop.
- Drag your entire website folder (or
index.html
file and related folders) into the upload box. - Netlify will start deploying your site immediately, and within moments, it will provide you with a link to access your new website.
Option B: Connecting to Git (for more experienced users)
If you’re using GitHub, GitLab, or Bitbucket to store your code:
- Select the platform you’re using (e.g., GitHub).
- Authorize Netlify to access your account and select the repository with your website code.
- Choose the branch you want to deploy (usually
main
ormaster
) and set the build command toNone
(as no extra build process is needed for static sites).
Netlify will now pull your files directly from the repository and deploy the site.
Step 4: Get Your Site URL
Once deployed, you’ll see a unique URL assigned to your site, usually something like https://unique-name.netlify.app
.
You can click on this link to view your live site. Netlify updates your site instantly whenever you make a change (if connected to a Git repository) or when you upload new files through drag-and-drop.
Step 5: Customize Your Site URL (Optional)
Netlify provides a way to personalize your site’s URL:
- In your Netlify dashboard, click on Site settings.
- Under Domain management, click Options and select Edit site name.
- Change the subdomain part of the URL (the part before
.netlify.app
) to something relevant to your site.
Now you have a personalized URL for your site!
Step 6: Enable HTTPS (Free and Automatic on Netlify)
Netlify automatically provides HTTPS for your site, ensuring it’s secure. You don’t need to configure anything for this; Netlify will handle it for you.
Congratulations!
You’ve successfully deployed your static site on Netlify, all without any complex setup or cost. With Netlify’s ease of use, your site is now accessible to anyone, anywhere. Enjoy your journey as a web publisher!