Netlify

On this page 7

Netlify is a commercial cloud platform for building, deploying and hosting web front ends, best known for popularizing the Jamstack approach in which prebuilt static files are served from a global content delivery network and dynamic behavior comes from APIs and serverless functions. In hosting, it sits between classic web hosting on servers that the customer manages and a full cloud provider: the customer supplies a Git repository, and the platform handles builds, distribution, TLS certificates and scaling.

Unlike shared hosting or managed hosting, Netlify does not give the customer a persistent server, a shell or a long-running process. Every deployment is an immutable snapshot of a site, which changes how teams think about releases, rollbacks and back-end logic.

How Netlify builds and serves a site

Netlify works by turning a Git push into an atomic deployment. When a commit reaches a connected branch on GitHub, GitLab, Bitbucket or Azure DevOps, a build container clones the repository, installs dependencies, runs the configured build command (for example npm run build) and collects the output directory.

The resulting files are uploaded to the platform’s storage, and only files whose content hash changed are transferred. A deploy becomes live by switching a pointer, not by overwriting files, so visitors never see a half-updated site and a rollback takes seconds. Each deploy also keeps its own permanent URL, which makes older versions easy to inspect.

The table below lists the main stages of a typical deployment and what each stage produces.

StageWhat happensResult
TriggerPush, pull request or build hook callA queued build
BuildDependencies installed, build command executedPublish directory and function bundles
UploadChanged files hashed and transferredImmutable deploy snapshot
PublishProduction pointer moved to the new deployLive site on the CDN
RollbackPointer moved back to an earlier deployPrevious version restored instantly
Stages of a Netlify deployment

Configuration lives in a netlify.toml file in the repository, which defines the build command, publish directory, redirects, headers and environment contexts. Keeping this file under version control means infrastructure settings are reviewed together with code.

Core features of the platform

Netlify bundles several services that a traditional hosting setup would assemble from separate products. The most important are edge distribution of static assets, serverless functions, deploy previews and automatic HTTPS through certificates issued by Let’s Encrypt.

The following table summarizes these features and the problems they solve.

FeaturePurposeTypical use
Netlify FunctionsRun short server-side code on demandForm handling, API proxies, webhooks
Edge FunctionsRun code at CDN locations before a responsePersonalization, geolocation, A/B routing
Deploy previewsBuild every pull request at a unique URLReview by designers and clients
Redirects and rewritesRule-based routing at the edgeLegacy URLs, single-page app fallback
FormsCapture HTML form submissions without a back endContact and signup forms
Split testingRoute traffic between Git branchesComparing two site variants
Main Netlify features

Functions are based on AWS Lambda underneath, which explains their constraints: a default execution limit of about 10 seconds for synchronous calls, cold starts after idle periods and no shared memory between invocations. Background functions extend the time limit for asynchronous work, but they still do not behave like a permanent application server.

Netlify compared with other hosting models

Netlify differs from classic hosting mainly in what the customer controls and what the platform abstracts away. Its closest competitor is Vercel, which offers a very similar Git-driven model with stronger ties to the Next.js framework; traditional options such as shared hosting with cPanel or a virtual private server give more control but require more operations work.

OptionServer accessScalingBest fit
NetlifyNone, platform managedAutomatic via CDNStatic sites, Jamstack front ends
VercelNone, platform managedAutomatic via CDNNext.js and React applications
Shared hostingLimited, control panelFixed plan resourcesSmall PHP sites, WordPress blogs
Managed WordPress hostingLimited, provider toolsVertical within planWordPress with dynamic pages
Virtual private serverFull root accessManual or scriptedCustom stacks and long-running apps
Netlify against neighboring hosting options

The key distinction is stateless versus stateful hosting. Netlify excels when the page can be generated ahead of time; a site that renders every request from a database, such as a standard WordPress installation, belongs on a stateful server unless it is converted to a headless architecture.

Choosing and configuring Netlify

Netlify is a strong choice when content changes less often than it is read and the team already works in Git. Marketing sites, documentation portals, portfolios and front ends of headless commerce systems are typical candidates.

The decision table below maps common situations to a recommendation.

SituationRecommendationReason
Static documentation siteUse NetlifyPrebuilt pages, cheap global delivery
Headless CMS front endUse Netlify with build hooksContent changes trigger rebuilds
Next.js app with heavy server renderingCompare with VercelFramework support differs in detail
Real-time app with WebSocketsUse a server or container platformFunctions cannot hold connections
Database-driven PHP siteUse conventional hostingNo PHP runtime on the platform
When Netlify fits a project

Good configuration practice includes pinning the Node.js version, separating secrets per deploy context (production, deploy preview, branch deploy), setting cache-control headers for hashed assets and defining a custom domain with DNS either at Netlify or through a CNAME record at an external registrar.

Limitations and common mistakes

The most significant limitation is usage-based pricing: plans meter bandwidth, build minutes and function invocations, so a traffic spike or a misconfigured build loop can produce unexpected costs or paused sites. Teams should set spending alerts and review usage regularly.

  • Long builds on large sites: thousands of pages can exceed build time budgets; incremental or on-demand rendering helps.
  • Treating functions as a back end: complex business logic with databases often needs connection pooling or a separate service.
  • Ignoring vendor-specific features: Netlify Forms and redirect syntax do not transfer directly to other hosts, which raises migration effort.
  • Missing redirect rules for single-page apps: without a fallback rule, deep links return a 404 error.
  • Exposing secrets in client bundles: environment variables used at build time can end up in public JavaScript.

A non-technical view

Netlify is a service that puts a website online for you without you having to rent or look after a server. You keep the website files in an online project folder. Every time you save a change there, Netlify rebuilds the site. It then sends copies to computers around the world.

Because visitors receive a copy from a nearby location, pages load quickly. The trade-off is that Netlify suits websites that can be prepared in advance. Sites that must compute every page on the fly usually need a different kind of hosting.

A concrete example

A software company maintains product documentation with about 1,200 pages written in Markdown and generated by a static site generator. Previously, the pages ran on a virtual private server that an engineer patched by hand, and releases required copying files over SSH.

The team connects the documentation repository to Netlify, sets the build command and publish directory in netlify.toml, and adds redirect rules for 300 legacy URLs. Every pull request now receives a deploy preview link that technical writers review before merging, and a merge to the main branch publishes the site in about four minutes.

The result is no server maintenance, automatic HTTPS on the custom domain and the ability to roll back a faulty release in seconds. The team also sets a bandwidth alert after noticing that a popular release note doubled monthly traffic.