How Website Deployment Works: From Code to a Live Website
Deployment turns your project into a website anyone can open. Your hosting platform takes the project, builds or runs it, and serves it when someone visits your domain.
What happens when you deploy a website?
- Your project is finished and ready to publish. Right now it is a folder of files — a website nobody else can open yet.
- The code is sent to a repository like GitHub, or straight to your hosting platform. Both work; a repository is simply the tidier route.
- The hosting platform receives the project and does whatever it needs: installs what the project depends on, builds the files, or starts the application.
- The deployed website becomes available at a public address, so it can be opened from any device on the internet.
- You connect your domain by pointing its DNS at the host, so the readable name leads to the same place.
- Someone opens the domain, DNS says where to go, the request reaches your hosting platform, and your live website comes back.
The main pieces
Your project — The finished website or web app on your computer: pages, code, images, settings. It works when you preview it locally, but nobody else can reach it — a folder of files is not public until something serves it.
A visitor — The person you built it for. They do not know where your project is hosted or what it was built with — they open a name, click a link or tap a search result, and expect a page. Everything on the lower half of this diagram exists to turn that name into your live website.
Code repository — A remote copy of your project, usually on GitHub, that records every version. It is the tidiest way to hand your latest code to a host, and many platforms watch the repository and redeploy on their own. It is a common bridge rather than a requirement — you can also send the project straight to your host. Either way, a repository serves nothing to visitors.
Your domain — A readable name like example.com that you rent, usually by the year. It is a label, not a place: it holds no pages and stores no files, and pointing it somewhere else tomorrow would change nothing about your site except how people reach it. Buying one does not put anything online.
DNS — The internet's public address book. When someone opens your domain, their browser asks DNS where that name leads and gets back the service hosting your site. DNS holds a pointer and nothing else — no pages, no files — so a DNS change never edits your website. It only changes which host answers for the name.
Hosting platform — The service that takes your project and makes it available on the internet. It receives or pulls the files, installs what they need, builds or starts the application, and serves the website when visitors request it. DNS helps their browser find where the site is hosted; the browser then sends the request to the host. Providers like Hostinger do this job; the job itself is the same wherever you host.
Build or run — What the host does with the project once it has it. A static site is built once into finished files, which are then served as they are. A site with a backend has its server process started and kept running. Either way this happens on the host, which is why the host is the piece that has to know how your project is put together.
Live website — Your project, running on the host and reachable at a public address. This is the moment it stops being a project and becomes a website: open it from a phone on the other side of the world and you get the same pages. Every later update replaces this version, which is why deploying again is a normal part of the work.
What is the difference between GitHub, hosting, and a domain?
GitHub stores and versions your code. It keeps every change you make, and it can hand the newest copy to your host automatically — but on its own it publishes nothing.
Hosting publishes and runs your website. It takes the project, builds or starts it, and answers every request that arrives. This is the only piece that actually puts a site on the internet.
A domain is the address people type. It is a name you rent, and it would work just as well pointed somewhere else tomorrow — which is the clearest sign that it is not the website itself.
DNS connects the two. It is the public lookup that tells a browser which service a domain leads to, and it holds that pointer and nothing else — no pages, no files.
So the repository holds your code, the hosting platform runs it, the domain names it, and DNS connects the name to the host.
Do you need paid hosting?
Not every project needs a paid plan. A simple static site — plain pages with nothing running behind them — can often go live on a free hosting tier and stay there.
Paid hosting starts earning its place the moment your project has to run something, or the moment being quietly offline for a day would actually cost you.