Deploying a website in 2026 means uploading your code to a host that serves it to anyone with the URL, and for most people the fastest path is connecting a Git repository to a managed platform that builds and publishes automatically. A plain static site can be live in minutes on a free tier; an app with a backend takes a few more steps. This guide walks the whole process in order: pick a host that fits your site, push your code, attach a domain, and turn on HTTPS.
Step 1: Know what kind of site you have
The right host depends entirely on what your site needs to do. Sorting this out first saves hours of confusion.
| Site type |
What it is |
Best fit |
| Static site |
HTML, CSS, JS files, no server logic |
Netlify, Cloudflare Pages, GitHub Pages |
| Frontend framework |
React, Vue, Svelte build output |
Vercel, Netlify, Cloudflare Pages |
| Full-stack app |
Has a backend or database |
Vercel, Render, Railway, Fly.io |
| Custom server |
You control the OS and runtime |
A VPS or a cloud provider |
If you are unsure, start with the simplest case: a plain static site needs no server logic at all, while anything with a login or database needs an app platform.
Step 2: Put your code in Git
Modern hosts deploy straight from a repository. Create one, commit your files, and push to a provider like GitHub or GitLab. This single step unlocks automatic deploys: every push triggers a fresh build and goes live without you uploading anything by hand. If Git is new to you, learn the basics of Git and GitHub before continuing.
Step 3: Connect the host and configure the build
Sign in to your host, point it at your repository, and tell it two things: the build command and the output directory.
// typical static-build settings on a managed host
build command: npm run build
output directory: dist
For a plain HTML site there is no build step at all; you just publish the folder. The host installs dependencies, runs the build, and serves the result from its global network. Most free tiers are generous enough for personal projects and small business sites.
Step 4: Add a custom domain and HTTPS
A real domain makes the site yours. Buy one from any registrar, then in your host dashboard add the domain and follow the DNS instructions, usually a CNAME or an A record. Propagation can take from minutes to a day. Nearly every managed host now provisions a free TLS certificate automatically, so HTTPS turns on without extra work once DNS resolves.
Step 5: Verify and set up redeploys
Open the live URL in a fresh browser, check it on your phone, and click through the main pages. Confirm HTTPS shows the padlock. From here, every push to your main branch redeploys automatically, so a CI pipeline with tests and preview deploys is a natural next upgrade once the basics work.
Common mistakes
- Choosing a server you have to manage. A bare VPS means patching, firewalls, and uptime worries. For a first site, a managed host removes all of that.
- Forgetting the build settings. A wrong output directory is the most common cause of a blank deploy. Match the command and folder your project actually produces.
- Ignoring DNS propagation time. If the domain does not work immediately, wait. It is rarely a configuration error.
- Committing secrets. Never push API keys into the repo. Use the host environment variables instead.
FAQ
How much does it cost to deploy a website?
For a static site or small app, often nothing. Free tiers from major hosts cover personal and small business sites. Costs appear only at meaningful traffic or with paid databases.
How long does deployment take?
The first deploy of a static site can finish in under five minutes. The slowest part is usually waiting for a custom domain DNS change to propagate.
Do I need to buy hosting and a domain separately?
Yes, usually. Hosting serves the files; a domain is the address. You can run a site on a free host subdomain first and add a custom domain later.
Can I deploy without knowing the command line?
Largely, yes. Drag-and-drop and Git-connected deploys cover most static sites with no terminal. Apps with a backend tend to need a little command-line comfort.
Where to go next
Host a website end to end, make a free website from scratch, and learn the basics of Git and GitHub.