
How to Deploy a Production Website with 100% Free Hosting on Vercel
Launching a professional, high-performance website used to require navigating complex server management, provisioning web hosts, and setting up paid SSL certificates. Today, modern cloud platforms have completely changed web infrastructure.
Vercel stands out as a top platform for developers and creator-entrepreneurs. Originally built by the creators of Next.js, Vercel provides enterprise-grade infrastructure on a global Edge Network—completely free for personal projects, blogs, portfolios, and startup Minimum Viable Products (MVPs).
This comprehensive, step-by-step guide walks through building, configuring, and deploying a modern website on Vercel’s Hobby Tier without spending a single dollar.
What Makes Vercel’s Free Tier So Generous?
Key Features of Vercel’s Free Hobby Plan:
- 100 GB Fast Data Transfer / Bandwidth per month: Sufficient bandwidth for tens of thousands of monthly visitors on static or hybrid sites.
- Automatic Global CDN & Edge Network: Your static assets (HTML, CSS, JS, images) are cached and served from nodes closest to your user.
- Automated CI/CD Pipelines: Pushing code changes to GitHub instantly triggers a fresh build and live deployment.
- Free Custom Domains & Automated SSL: Connect custom .com domains with free, auto-renewing Let’s Encrypt TLS/SSL certificates.
- Unlimited Preview Deployments: Every pull request or branch push gets its own isolated testing URL.
- DDoS Protection & Edge Firewall: Automated traffic filtering at the network edge protects your site against malicious bots.
Setting Up Your Development & Deployment Stack
To establish a production-grade continuous integration flow, configure your deployment pipeline using three tools:
[ Local Code Editor ] ──git push──> [ GitHub Repository ] ──webhosting──> [ Vercel Edge Build ]
Essential Prerequisites:
- Node.js (v18.x or higher): Installed on your local machine to run modern JavaScript frameworks.
- Git & GitHub Account: Source code management and repository hosting (GitLab or Bitbucket also work natively with Vercel).
- Vercel Account: Signed up using your GitHub credentials at
vercel.comfor seamless integration.
Creating a Modern Web Project (Astro Example)
For optimal speed, SEO, and developer experience, modern static-site frameworks like Astro, Next.js, or SvelteKit work exceptionally well with Vercel.
Create an Astro project locally using the command-line interface:
# Initialize a new Astro project
npm create astro@latest my-free-website
# Follow the terminal prompts:
# - Include sample files? Yes
# - Install dependencies? Yes
# - Initialize Git repository? Yes
# - TypeScript setup? Relaxed or Strict
# Navigate into your project directory
cd my-free-website
# Launch local preview server
npm run dev
Open http://localhost:4321 in your browser to confirm your local build is functioning smoothly.
Connecting Source Control (GitHub Integration)
Before Vercel can host your site, push your codebase to a remote Git provider.
- Log in to GitHub and create a new repository named my-free-website. Leave it empty (do not check “Initialize with README”).
- Link your local codebase to the remote repository and push your main branch:
# Add the remote repository URL
git remote add origin https://github.com/YOUR-USERNAME/my-free-website.git
# Set the default branch name to main
git branch -M main
# Commit and push your local files
git add .
git commit -m "Initial commit: Production ready site"
git push -u origin main
Deploying to Vercel via the Web Dashboard
With your source code securely pushed to GitHub, trigger your first deployment via Vercel’s visual interface.
Step-by-Step UI Deployment:
- Log in to your Vercel Dashboard.
- Click the “Add New…” button and select “Project”.
- Under “Import Git Repository”, select GitHub. If prompted, grant Vercel access to your newly created repository.
- Locate
my-free-websiteand click “Import”.
┌────────────────────────────────────────────────────────┐
│ Configure Project in Vercel │
├────────────────────────────────────────────────────────┤
│ Framework Preset: Astro (Auto-detected) │
│ Root Directory: ./ │
│ Build Command: npm run build │
│ Output Directory: dist │
└────────────────────────────────────────────────────────┘
- Framework Auto-Detection: Vercel automatically detects framework parameters (Astro, Next.js, Vite, Nuxt) and configures the build command (npm run build) and output directory (dist or .next).
- Click “Deploy”.
Vercel provisions a virtual build environment, runs your install script, builds the static assets, and deploys them to its global Edge network. Within 60 seconds, you will receive a production URL ending in .vercel.app (e.g., [https://my-free-website.vercel.app](https://my-free-website.vercel.app)).
Configuring a Custom Domain with Free SSL
While the default .vercel.app domain is excellent for staging, a custom domain (e.g., yourname.com) creates a polished, professional brand image.
Step 1: Add your domain in Vercel
- In your project dashboard, navigate to Settings > Domains.
- Enter your custom domain (e.g.,
yourdomain.com) and click Add. - Select whether to configure the domain with or without the
wwwprefix (Vercel will manage automated 301 redirects between both).
Step 2: Configure DNS Records at Your Registrar
Log in to your domain provider (e.g., GoDaddy, Namecheap, Cloudflare, or Porkbun) and locate your DNS Management panel. Update your DNS records using one of two strategies:
- Method A: Direct A & CNAME Records (Standard) Add these records directly into your domain registrar’s DNS settings:
| Type | Name / Host | Target / Value | TTL |
|---|---|---|---|
| A | @ |
76.76.21.21 |
Automatic / 1 Hour |
| CNAME | www |
cname.vercel-dns.com |
Automatic / 1 Hour |
- Method B: Vercel Custom Nameservers (Full Edge Routing)
Alternatively, point your domain’s nameservers directly to Vercel to manage DNS records from the Vercel Dashboard:
ns1.vercel-dns.comns2.vercel-dns.com
Step 3: SSL Provisioning & Verification
Once your DNS records propagate (typically within 5 to 30 minutes), Vercel automatically issues a free, valid Let’s Encrypt TLS/SSL certificate. All HTTP requests will automatically redirect to secure HTTPS without manual web server configuration.
Advanced Configuration: Environment Variables & Security
Managing Environment Variables
To keep confidential API keys, database URLs, or secret tokens out of your public Git repository, store them in Vercel’s encrypted key-value store.
- Navigate to Project Settings > Environment Variables in Vercel.
- Add your variable pairs:
- Key:
PUBLIC_ANALYTICS_ID - Value:
G-XXXXXXXXXX
- Assign scope options across Production, Preview, and Development environments.
In Astro or Vite, access public client variables via import.meta.env.PUBLIC_ANALYTICS_ID.
Implementing Firewall & Edge Security Rules
Vercel includes an integrated Web Application Firewall (WAF) even on the Hobby tier. You can set up security rules directly from the Vercel Dashboard:
Vercel Dashboard ──> Firewall ──> Rules ──> Add Rule
- Geo-Blocking: Restrict incoming traffic by continent or country code to eliminate non-target spam traffic.
- IP Rate Limiting: Prevent scraper bots from exhausting your monthly fast data transfer quotas.
- Header Enforcements: Insert custom security headers (X-Frame-Options, Content-Security-Policy) inside a
vercel.jsonfile at your project root:
{
"headers": [
{
"source": "/(.*)",
"headers": [
{
"key": "X-Frame-Options",
"value": "DENY"
},
{
"key": "X-Content-Type-Options",
"value": "nosniff"
},
{
"key": "Referrer-Policy",
"value": "strict-origin-when-cross-origin"
}
]
}
]
}