All notes

Netlify Tutorial: How to Host a Website on Netlify (2026)

Every static site we ship goes live on Netlify, this blog included. If you have an HTML site, or anything that builds to static files, this is how to host it: two ways to deploy, a custom domain, the security headers we set with netlify.toml, and form handling for sites that need to catch a lead without a backend.

Netlify is the deploy layer in the stack we run on. Other tools do the research and the building — the trend data we pull with Apify, for one — and Netlify is where the finished page gets previewed, handed to a client, and rolled back if launch day goes sideways.

What Netlify is

Netlify hosts static and JAMstack sites on a global CDN. You give it a folder of files, or a repo it builds for you, and it puts them on a fast URL with HTTPS already handled. No server to manage. For a plain HTML site there is nothing to configure to get started — it just serves the files.

Two ways to deploy

Pick based on how you work.

The fast way: drag and drop

Log in, go to the Sites area, and drag your site folder onto the drop zone. It uploads and goes live on a random *.netlify.app URL in seconds. Good for a one-off or a quick share.

The real way: git or CLI

For anything you will update, connect a Git repo or use the CLI. Connect a repo and every push deploys automatically, with a preview URL for every pull request. Or deploy from your terminal:

npm install -g netlify-cli
netlify link            # connect this folder to a site
netlify deploy          # deploy a draft to a preview URL
netlify deploy --prod   # ship it to the live site

That netlify deploy without --prod is the one we lean on. It gives a real page on a real URL that is not live yet — the exact thing you send a client to review before launch.

Disclosure Some links on this page are affiliate links — if you sign up through them we may earn a commission at no extra cost to you. We only list tools we actually run our studio on.

Netlify's free tier hosts a static site like this one at no cost.

Visit Netlify

Custom domain

A netlify.app URL is fine for previews, not for a launch. Add your domain in the site's Domain settings, then either point your registrar's nameservers at Netlify or add the records it shows you. HTTPS is provisioned automatically once DNS resolves — you do not buy or install a certificate. The one gotcha is propagation: DNS changes can take a while, so do the domain step before launch day, not on it.

The netlify.toml file

How the site behaves lives in one file at the repo root: netlify.toml. This is where we set security headers and cache rules. The block on this site looks like this:

[[headers]]
  for = "/*"
  [headers.values]
    X-Frame-Options = "DENY"
    X-Content-Type-Options = "nosniff"
    Referrer-Policy = "strict-origin-when-cross-origin"

[[headers]]
  for = "/assets/*"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

The first block hardens every response: no clickjacking, no MIME sniffing, tighter referrer behavior. The second tells browsers to cache static assets hard, since our asset filenames change when the contents do. You commit the file, deploy, and Netlify applies it. No dashboard clicking.

Forms without a backend

Client sites usually need to catch a lead: a contact form, a demo request. Netlify Forms handles that with no server. Add one attribute to the form and Netlify captures every submission:

<form name="contact" method="POST" data-netlify="true">
  <input type="email" name="email" required>
  <button type="submit">Request a demo</button>
</form>

Submissions show up in the Netlify dashboard and can email you or hit a webhook. The free tier includes a monthly submission allowance that is plenty for a launch page. For a low-traffic contact form you may never leave it.

Pricing, an honest take

The free tier is genuinely generous for what we do: static hosting, HTTPS, deploy previews, and a monthly bandwidth and build-minute allowance that a normal marketing site does not come close to using. Paid plans raise those allowances, add team features, and lift the form submission cap. Bandwidth and build minutes are usage-based above the included amount.

Honest take: for a hand-built static site, most people never pay Netlify a cent, and that is not a trick — it is the correct plan for the job. You move up when you have a team or traffic that actually needs it. The one thing to watch is a heavy build pipeline burning build minutes; a plain HTML site has none of that. Check the current pricing page before you assume a tier.

Verdict

Netlify is the least dramatic part of the stack, which is exactly why it is in it. Push a folder, get a live HTTPS site, hand a preview to a client, roll back in one click if you need to. Set your headers in netlify.toml, catch leads with a one-attribute form, and stop thinking about hosting. When we build a page as part of the launch pipeline, or a storefront for the product line we run on Printify, this is where it goes live.

Deploy your first static site free in a couple of minutes.

Visit Netlify

Frequently asked questions

Is Netlify free?

Yes. The free tier covers static hosting, automatic HTTPS, deploy previews, and a monthly bandwidth and build-minute allowance that most marketing sites never exhaust. You pay when you need team features or higher limits.

Netlify vs Vercel, which should I pick?

Both are excellent static and JAMstack hosts. For plain HTML and static sites they are close enough that habit wins. We ship on Netlify because deploy previews, netlify.toml, and Forms fit our workflow. If you live in Next.js, Vercel is the more natural home.

Can I use my own custom domain?

Yes, on the free tier. Add the domain, point DNS at Netlify, and HTTPS is provisioned automatically. Do it a day or two before launch so DNS has time to propagate.

How do Netlify Forms work?

Add data-netlify="true" to a form and Netlify captures submissions with no backend. They appear in the dashboard and can trigger an email or webhook. The free tier includes a monthly submission allowance.

Want this built for you?

MaxSun Media ships the whole launch — landing page, launch video, brand system — live in days. Start with a call.

Book an intro call