Hosting and deploy
What is Netlify, and how do you deploy a site on it?
Netlify builds and hosts websites from a Git repository on a global CDN. How deploys, netlify.app addresses, functions and forms work, and what to check.
Netlify is a platform for building and hosting websites. You connect a Git repository, Netlify runs your build on each push and publishes the result on its global CDN, with HTTPS, deploy previews and rollbacks included. Every site gets a netlify.app address, and you can add a custom domain. Serverless functions and forms cover simple backend needs.
Published · Last updated
What Netlify does
- Builds your site from Git on every push, with the build command you set, such as npm run build.
- Hosts the output on a CDN, with automatic HTTPS.
- Creates deploy previews for pull requests, each at its own URL.
- Keeps every deploy, so you can roll back instantly.
- Runs serverless and edge functions, handles form submissions, and supports redirects and headers in configuration files.
Deploying a site
- Sign in, choose Add new site, and import your repository.
- Set the build command and publish directory, for example npm run build and dist for Vite.
- Add environment variables in the site settings.
- Deploy. The site appears at a name like preview.example.
Redirects and single-page apps
Single-page apps need a fallback so every path serves index.html. Add a _redirects file to the published folder:
/* /index.html 200
The same file handles permanent redirects, such as /old /new 301. Response headers, including security headers, can be set in a _headers file or netlify.toml.
The netlify.app address
Your site stays reachable at its netlify.app address after you add a custom domain. Set your custom domain as primary so Netlify redirects the default address to it, and make sure canonicals point at your domain. Otherwise both addresses can be crawled as duplicates.
Deploy previews are public URLs. Do not put real customer data or production secrets in preview builds, and keep previews out of search with noindex if they are linked anywhere.
Before going live
- Custom domain connected, HTTPS active, the non-primary name redirecting.
- Security headers set in _headers or netlify.toml.
- Cache headers sensible: long for hashed assets, short for HTML.
- No preview or netlify.app URLs in canonicals or the sitemap.
- Form spam protection on, if you use Netlify Forms.
What a scan can and cannot tell you
WebAuditOS checks a Netlify site from outside: HSTS, cache headers, redirects from HTTP and canonicals pointing at your own domain rather than the netlify.app address.
It does not see your build logs, plan usage or Netlify settings.
A canonical that points at preview.example is a common leftover from the first deploy. The canonical host check flags it.
Short answers
Is Netlify free? It has a free plan for small sites. Check current limits on its pricing page.
What is netlify.app? The default subdomain every Netlify site gets.
Netlify or Vercel? Both host static sites and functions well. Vercel is closest to Next.js. Netlify is framework-neutral.
Why does my Netlify site 404 on refresh? Add the single-page app fallback in _redirects.
In the product
The checks this maps to
Every check named here runs on every scan, on every plan - what a plan changes is how many pages are crawled, how long the history is kept and what you can do with the result. These are the ids the findings carry, so you can match a line in a report to the explanation above.
- sec.headers.hsts - Strict-Transport-Security header
- perf.cache-headers - Cache-Control configured
- sec.https.redirect - HTTP redirects to HTTPS
- seo.canonical.same-site - Canonical points to this site
Read next
Hosting and deploy
How do you host a website?
The ways to host a website in 2026, from static hosts to app platforms and servers: what each suits, the effort involved, and what to check before launch.
Hosting and deploy
How do you connect a custom domain to your website or app?
How to point your own domain at Vercel, Netlify, Railway, Lovable or any host: which DNS records to add, how HTTPS gets issued, and how to fix the usual errors.