Where Can I learn about web hosting?

Through freecodecamp, I’ve learned about programming. But I don’t know how to host a website from the ground up. I’ve pretty much just done stuff on either codepen or glitch, and I’m kind of at a loss for how to host a website that I make from scratch. Where can I learn about this?

My goal is to first make and host a portfolio website for myself. But after this I’d like to look into freelancing where I’d make websites for others. And for this I need to learn how to let them have access to editing the website too I suppose. I suppose I would share ownership of the website with them or completely transfer ownership to them? I don’t know how this works. I’d like just a good tutorial for noobs about this stuff.

1 Like

I really want to answer your question but I’m feeling really lazy so it won’t be as high quality as it could be.

So if you’ve only worked on online environments I highly suggest you setup a local dev environment.

At it’s most basic this is just using a text editor like VS Code to create/edit your files and a web server to host them locally. Web servers being Apache, NGINX, IIS are the ones I know. Node/express can directly serve your files too but in production I believe it generally sits behind a webserver acting as a reverse proxy.

Remote static hosting is very easily accomplished with services like githubpages, surge, netifly and these are all free. They are doing the same thing essentially as the local environment you’d potentially setup, it’s just a computer running a webserver that’s publicly visible. You could do the same thing by forwarding ports on your router if you wanted, same goes for a server of any type.

To get a domain name you’ll need to buy one from a registrar which usually costs $10-$20 a year.

If you’re wanting to host a site that has a backend of node, python, or whatever you need a server. Services like Digital Ocean, AWS, Linode are servers that are usually a VPS on shared hardware to make it more cost effective that you can upgrade when you need more resources, can be as low as $5 a month.

This process is simplified even more with services like Heroku which you can think of like glitch except without the web development environment, they take care of setup whereas with AWS, DigitalOcean, or any rented server you will be doing the setup manually more or less.

I don’t have any one resource and this might be an information overload but hopefully it can help with some concepts/terms to search for and learn more.

2 Likes

Thanks, it’s becoming a little less fuzzy to me. Something still seems odd. As long as I don’t mind not having my ideal domain name, I could pretty much have a free website with backend just by using glitch. But I suppose its server is less “fast” than using actual server services? Well, in any case I may as well just dive in and start learning for myself.

Glitch as well as the free version of heroku “spin down” when not in use. With heroku you can pay to not have this happen and it takes care of installing/updating the OS, your choice of backend, SSL, etc.

It makes things really easy.

One option to consider for learning is to get an old computer and install linux on it. Plug it into your network, install an SSH server and then from your main computer you can log into it with an SSH client and can install whatever you like.

Oh and DigitalOcean also has great docs/tutorials on how to set everything up too.

The way all these techs fit together are called stacks. FCC teaches the MERN stack essentially.

Some others are MEAN and LAMP but there are many more and big companies usually have custom stacks.

You can check out FCC’s here and use this website to check out other big companies stacks.
https://stackshare.io/free-code-camp/free-code-camp

I suggest using term ‘deployment’ over ‘web hosting’, this will make your search easier :slight_smile:
The best resource I know is Linux Academy:
https://linuxacademy.com/

1 Like

A cheaper alternative to this is to install a VM (like Virtual Box) and install Linux on that. Then you have a second machine emulated on your single computer and you can practice ssh-ing on to that.

1 Like

Something I may consider is using a Raspberry Pi as a web server for learning on. It’s not going to use as much power as another PC, and you get to keep your desk clear. Then you can learn how to configure and secure it, and then try to kill it with Kali. I’ve not used Kali, but I’ve read it’s the go-to Linux for hacking.

For the coding part, you’ll need an editor such as VS Code or Atom (both free), and then you’ll need a web host if access from the internet is intended, and an FTP program to transfer your files from your computer to the host server; Filezilla is good for that. I’m not sure if web hosting would work without a domain name. I mean, use the IP address instead of a domain name.

If you just want basic hosting for a small site (static or php), CINFU is really affordable at $0.66 USD per month for a 1GB storage, unlimited data plan. There are larger plans available. They also have VPSs with 50GB and unlimited data for $4.09 USD per month (paid annually) if you’d like to set up your own server.

1 Like

Hi, there are also free hosting solutions that you could use for the learning period and/or for showing prototypes to people.

They are not as nice and professional as the paid ones and they come with their limitations, but at least they’ll allow you to get some experience with the process.
Usually with these, instead of having your domain, you’ll be able to chose a subdomain something like www.thisIsThePartYouCanChose.NameOfHostingProvider.com.
Other cases of limitations I’ve heard about are advertisement banners inside your page (can’t remember who was the provider) and your data being deleted after a certain number of days (Red Hat free tier, iirc).

You generally get a cPanel (or something similar) that will allow you to manage your site. And you can deploy files there through FTP.

2 Likes

There are a number of questions here, I’ll try to address to the best of my ability. I’m not a freelancer, but I can offer some insight to the process :slight_smile:

But I don’t know how to host a website from the ground up. I’ve pretty much just done stuff on either codepen or glitch, and I’m kind of at a loss for how to host a website that I make from scratch. Where can I learn about this?

Back in the day, hosting a website required you to handle every aspect of hosting, you’d have to run a computer in a closet to act as a server 24/7. You’d have to manage the software that runs the website, build the website, update and maintain the code, handle domain registration, forwarding, security and update the software and hardware. It was very common to use something like the LAMP stack.

Fast forward to today and you’ll find basically no one takes the 100% ground up approach anymore, due to the rise of cloud computing. This is where companies like Amazon, Google, Microsoft, and Digital Ocean (just to name a few) provide services from providing the hardware, to a full run-time environment.

For example, glitch provides an IDE and hosting/runtime environment that can run your code, in the cloud. If you wanted to create your own website, all you’d really need is to host/run the code, get the domain and link them so when I enter your domain name, I get the stuff from where your hosting the website. You will need to do a lot more than just those steps for production sites, like handle security, stability and updates, but the core idea is there and easy to start.

My goal is to first make and host a portfolio website for myself.

If the requirement is to have a portfolio website, then you probably could get by with any static hosting solutions out there. I would not pay for anything besides domain registration (if you want a custom domain name). Solutions like github pages provide a way to host static front-ends for free.

But after this I’d like to look into freelancing where I’d make websites for others. And for this I need to learn how to let them have access to editing the website too I suppose. I suppose I would share ownership of the website with them or completely transfer ownership to them? I don’t know how this works. I’d like just a good tutorial for noobs about this stuff.

I’ve heard of 2 approaches to freelancing and handling hosting for clients.

  1. You have clients pay a small monthly fee to maintain their sites for them. This is nice in that it gives you stable income, and if you have enough experience and clients, a great way to keep a steady stream of $$ coming in when freelancing. The disadvantage is if there is a problem its up to you to handle it.

  2. You hand-off the project to the client onces the work is done. Usually this involves some kind of written agreement on what work should be done, what has been done, and documentation on how the client can maintain their own code. There is always room for the client to ask for updates down the line as well.

If you plan on freelancing, I recommend reading more into the gig, as freelancing is as much technical as it is other skills. You need to be your own manager, promoter, designer, QA, IT, RnD, marketer, and finance person along with the programmer all at once.

I’d say at this point, look into freelancing to get an idea of what it will take, but keep looking into all the technologies I posted, and what others have provided to get a better idea of the technical side of things.

Good luck and keep building :smile: