Netlify is a developer-friendly hosting platform that's perfect for static sites. It offers generous free tier, instant deployments, and built-in CI/CD.
- A Netlify account (free) - Sign up at netlify.com
- Your code in a Git repository (GitHub, GitLab, or Bitbucket)
FREE tier includes:
- 100GB bandwidth/month
- Automatic SSL
- Custom domain support
- Continuous deployment
- Unlimited sites
Perfect for landing pages with moderate traffic!
This method automatically rebuilds and deploys your site on every git push.
- Log in to Netlify
- Click "Add new site" → "Import an existing project"
- Choose your Git provider (GitHub, GitLab, or Bitbucket)
- Authorize Netlify to access your repositories
- Select your landing page repository
Fill in the build settings:
Base directory: (leave empty)
Build command: npm run build
Publish directory: dist
Advanced build settings (optional):
Node version: 22
- Click "Deploy site"
- Netlify will:
- Install dependencies
- Run your build command
- Deploy the
distfolder
- Your site goes live in 1-2 minutes!
You'll get a random URL like: https://random-name-123456.netlify.app
- Go to Site settings → Site details
- Click "Change site name"
- Choose a custom name:
https://your-landing-page.netlify.app
Perfect for quick tests or if you don't have a Git repository.
npm run build- Go to Netlify Drop
- Drag and drop your
distfolder - Your site is live instantly!
Note: This method doesn't support automatic deployments. You'll need to manually upload the dist folder each time you make changes.
For developers who prefer the command line.
npm install -g netlify-clinetlify loginThis opens a browser window to authenticate.
netlify initFollow the prompts:
- Create & configure a new site
- Choose your team
- Set site name (or use auto-generated)
- Build command:
npm run build - Publish directory:
dist
netlify deploy --prodOr for preview deployments:
netlify deploy- Go to Site settings → Domain management
- Click "Add custom domain"
- Enter your domain (e.g.,
yourdomain.comorlanding.yourdomain.com) - Click "Verify" and "Add domain"
Option A: Use Netlify DNS (Recommended - Easiest)
- Netlify will provide nameservers
- Go to your domain registrar
- Replace existing nameservers with Netlify's nameservers:
dns1.p01.nsone.net dns2.p01.nsone.net dns3.p01.nsone.net dns4.p01.nsone.net - Save changes
Option B: External DNS
Add these DNS records at your domain registrar:
For apex domain (yourdomain.com):
Type: A
Name: @
Value: 75.2.60.5
For subdomain (landing.yourdomain.com):
Type: CNAME
Name: landing
Value: your-site.netlify.app
- Wait for DNS propagation (up to 48 hours, usually faster)
- Netlify automatically provisions SSL certificate
- Enable "Force HTTPS" in Domain settings
If you need environment variables for your build:
- Go to Site settings → Environment variables
- Click "Add a variable"
- Add key-value pairs
- Redeploy your site
Create a netlify.toml file in your project root for advanced configuration:
[build]
command = "npm run build"
publish = "dist"
[build.environment]
NODE_VERSION = "22"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200This file is version-controlled and ensures consistent builds.
Netlify automatically creates deploy previews for pull requests:
- Create a pull request on GitHub
- Netlify builds and deploys a preview
- Get a unique URL to test changes
- Share with team before merging
Perfect for collaboration!
Netlify has built-in form handling—perfect for landing page contact forms!
<form name="contact" method="POST" data-netlify="true">
<input type="text" name="name" required />
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>Netlify automatically detects and handles the form!
- Go to Site settings → Forms
- View all submissions
- Set up email notifications
Free tier includes:
- 100 form submissions/month
- Spam filtering
- Email notifications
Netlify offers basic analytics for $9/month per site, but you can use free alternatives:
- Google Analytics
- Plausible Analytics (privacy-friendly)
- Cloudflare Analytics (if using Cloudflare DNS)
- Check the build logs in Netlify dashboard
- Verify
package.jsonincludes all dependencies - Test build locally:
npm run build - Check Node version compatibility
Add redirect rules in netlify.toml:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200- Wait 24-48 hours for DNS propagation
- Check DNS settings:
dig yourdomain.com - Verify nameservers if using Netlify DNS
- Check for conflicting DNS records
Netlify automatically provides:
- Global CDN: 100+ edge locations worldwide
- Automatic compression: Gzip and Brotli
- HTTP/2: Faster loading
- Instant cache invalidation: Changes go live immediately
- Asset optimization: Images and code optimization
Made a mistake? Easy rollback:
- Go to Deploys tab
- Find the previous working deploy
- Click "Publish deploy"
- Previous version is live in seconds
Show deployment status in your README:
[](https://app.netlify.com/sites/YOUR-SITE-NAME/deploys)Find your badge in Site settings → General → Status badges
- Set up custom domain for professional branding
- Configure form notifications for lead capture
- Enable deploy notifications (Slack, email, etc.)
- Set up branch deploys for staging environments
Free tier:
- Cost: $0/month
- Bandwidth: 100GB/month
- Build minutes: 300 minutes/month
- Sites: Unlimited
Perfect for landing pages! You'll likely never need to upgrade unless you get massive traffic.
Deployment Time: 1-3 minutes per deployment Difficulty: Very Easy 🟢