This is something I’ve been curious about for a long time! I’ve been working on an HTML website on my PC and would love to make it live. I heard you can host a site yourself using your own computer, but it has to be on all the time and connected to the internet. How does that work?
Also, if I decide to use something like GitHub, would I need my PC running, or is it just a matter of uploading my HTML files to the internet?
I hope this makes sense and that someone can help clear this up!
EDIT: I’m leaning toward using GitHub now. Do I still need my PC on, or do I just upload the files to GitHub?
To host a website, you’ll need a web server. This can be any computer connected to the internet—even a laptop! For self-hosting, you’ll need to install server software (like Apache or Nginx) and set up things like a static IP and port forwarding on your router. This allows others to access your website through the internet.
Alternatively, for simpler setups like static websites, you can use platforms like GitHub Pages. All you need to do is upload your files, and it’s live. No need to keep your computer running for these services!
Helena said: @Lilly
GitHub Pages could work well if it’s just a basic HTML site.
What exactly is a static website?
A static website uses basic HTML, CSS, and maybe some JavaScript, but doesn’t need a server to handle backend functions. It’s great for simple sites with text and images but no user login or shopping carts, for example.
Instead of self-hosting on your PC, just go with a shared hosting provider—they’ll handle all the technical setup for you. Or use GitHub Pages or Netlify for free static file hosting.
You’ll also need a domain name to make your site accessible, which you can buy from a registrar. Then, simply upload your files, and you’re good to go.
@Paxton
Yep, self-hosting on home hardware isn’t worth it unless you’re dealing with very specific security requirements. Most ISPs even block traffic on standard website ports like 80 and 443 unless you’re on a business plan, which can be costly.
Dorian said: @Kingsley
You could self-host to test things, then switch to cloud hosting once your site is ready for public access.
True! For local testing, setting up a local server is a safer approach. This way, you can test on all devices on your home network without opening up to outside risks.