How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private)

TLDR: On free Github, you can’t host your website on Github Pages AND keep your repository private. You can pay to upgrade Github if you want, but I will show you how you can host it on Netlify instead.

Recently I built a new personal website which I …


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Tia Eastwood

TLDR: On free Github, you can't host your website on Github Pages AND keep your repository private. You can pay to upgrade Github if you want, but I will show you how you can host it on Netlify instead.

Recently I built a new personal website which I wanted to publish, but I also wanted to keep the repository private. I use Github to store my code, so usually I would use Github pages to publish my site. However on the free version of Github, you can't publish your site on Github Pages AND keep your repo private; you have to upgrade and pay for that.

Well I didn't want to pay 😄 but luckily Netlify is super easy and free!

Set up an account with Netlify if you don't have one already. Just select the starter option which is free and you can set up a new 'team' to start with. I just set up a team of me 😁

Once that was all set up, I went ahead and selected "Add new site".

Screenshot of Netlify Dashboard

I went with "Import an existing project":

Options displayed when you click add new site

Choose your Git provider (I'm going with Github of course) and it will take your through the process of connecting to your account and then a list of all your repos (even the private ones) will be available for you to choose from.

Options for connecting to git repository

Choose the repo of your site that you want to publish and then you'll get to this next screen. If you've kept things simple, then owner should be you and branch to deploy is probably "main". I have never needed to make any changes to the "Basic build Settings" section myself, but you can certainly go and learn more about it.

screenshot build options

Click "Deploy site" when you're ready and it will start the build / deploy process. If there are any errors, then they will be highlighted here, otherwise your site will be live! It's that easy!

At this point, if you have a custom domain you've purchased, you can also add it via the "Domain Settings" option. I won't go into that now, but there is some helpful information for that on Netlify's docs and you can also ask your domain provider if you're not sure how to connect it to your site.

There we are! I think that's a pretty straightforward option for even beginners looking to host their first site, but if you have any other recommendations / tips then please do share so everyone can learn! ☺️
_
Credit: Cover photo by Cookie the Pom on Unsplash_


This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by Tia Eastwood


Print Share Comment Cite Upload Translate Updates
APA

Tia Eastwood | Sciencx (2022-11-21T15:52:56+00:00) How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private). Retrieved from https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/

MLA
" » How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private)." Tia Eastwood | Sciencx - Monday November 21, 2022, https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/
HARVARD
Tia Eastwood | Sciencx Monday November 21, 2022 » How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private)., viewed ,<https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/>
VANCOUVER
Tia Eastwood | Sciencx - » How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/
CHICAGO
" » How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private)." Tia Eastwood | Sciencx - Accessed . https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/
IEEE
" » How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private)." Tia Eastwood | Sciencx [Online]. Available: https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/. [Accessed: ]
rf:citation
» How to Host Your Website for Free on Netlify (& Keep Your Github Repo Private) | Tia Eastwood | Sciencx | https://www.scien.cx/2022/11/21/how-to-host-your-website-for-free-on-netlify-keep-your-github-repo-private/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.