Deploy Your AI-Generated Website to Production: Step-by-Step
Deploy Your AI-Generated Website to Production: Step-by-Step
You've generated your site. You've iterated on the design and copy. Your code is on GitHub. Now comes the part that makes it real: getting it live on the internet where customers can find you.
This guide walks through how to deploy your AI-generated website to production — whether you're deploying to Vercel (easiest), your own domain, or a different hosting provider.
By the end, your site will be live on production infrastructure, with SSL encryption, global CDN distribution, and automatic deployments every time you push code. No manual server management. Just real hosting that works.
Before You Deploy: Pre-Deployment Checklist
Don't skip this. Takes 10 minutes and prevents disasters.
Content & Copy:
- All text is proofread (no typos, no placeholder text)
- All URLs are correct (no broken links)
- All images are loading (check mobile too)
- CTAs are pointing to the right places
- Meta descriptions are set (check head section of each page)
Technical:
- Site loads on mobile without layout issues
- No console errors (open DevTools, check Console tab)
- Contact forms work end-to-end
- Email/notification endpoints are configured
- Environment variables are set (API keys, domains, etc.)
SEO Basics:
- H1 tags are present and relevant
- Page titles are unique and descriptive
- Image alt text is present
- Open Graph tags are set (for social sharing)
- Robots.txt allows indexing
Domain & Branding:
- Custom domain is registered (if using one)
- Domain DNS is ready to point to Vercel
- Brand colors and fonts are consistent
- Favicon is set correctly
Option 1: Deploy to Vercel (Easiest)
Vercel is the hosting platform built by Next.js creators. It's the simplest path: connect GitHub, push code, deploy automatically.
Step 1: Set Up Vercel Account
- Go to vercel.com
- Click "Sign Up" (or sign in if you have an account)
- Choose "Continue with GitHub" (easiest)
- Authorize Vercel to access your GitHub account
- Done
You're now in the Vercel dashboard.
Step 2: Connect Your GitHub Repository
- Click "Add New" → "Project"
- Select your GitHub repository (the one created when you exported from FORGE)
- Vercel auto-detects that it's a Next.js project (good)
- Click "Deploy"
Vercel immediately starts building. This takes 2-5 minutes.
Vercel is building your site...
✓ Building
✓ Optimizing
✓ Generating sourcemaps
✓ Deploying
✓ Verifying
When it's done:
Production
https://your-site.vercel.app ← Your live URL
Your site is now live on the internet. Test it:
- Click the URL
- Scroll through pages
- Click links
- Test contact form
- Check mobile view
Everything working? Great. Move to adding your custom domain.
Step 3: Add Your Custom Domain
If you registered a custom domain (yoursite.com), point it to Vercel:
In Vercel:
- Go to your project settings
- Click "Domains"
- Click "Add Domain"
- Enter your domain (e.g., yoursite.com)
- Vercel shows DNS records to add
In your domain registrar (GoDaddy, Namecheap, etc.):
- Log in to your registrar account
- Find "DNS Settings"
- Add the records Vercel shows (usually just one CNAME record)
- Save
Example DNS record:
Type: CNAME
Name: www
Value: cname.vercel-dns.com.
DNS propagation takes 15 minutes to 48 hours. While waiting:
- Test at yoursite.vercel.app (the default URL still works)
- Review content one more time
- Set up analytics if you want
Once DNS propagates:
- yoursite.com is live
- https:// works automatically (Vercel provides SSL)
- All traffic is encrypted
Step 4: Set Up Automatic Deployments
Vercel auto-deploys every time you push to GitHub. No action needed.
This means:
- You edit code locally
- You commit and push to GitHub
- Vercel automatically builds and deploys
- Your site updates within 2-5 minutes
- No manual server management
That's the whole point of Vercel.
Option 2: Deploy to Railway (Control with Simplicity)
If you want slightly more control than Vercel but without managing servers, Railway is great.
Step 1: Create Railway Account
- Go to railway.app
- Sign up with GitHub
- Authorize Railway
Step 2: Deploy from GitHub
- Click "New Project" → "Deploy from GitHub"
- Select your repository
- Railway auto-detects it's Next.js
- Click "Deploy"
Railway builds and deploys. Takes 3-5 minutes.
Deployment Status: Active
URL: https://your-site-xxxx.railway.app
Step 3: Connect Domain
- In Railway, go to your project
- Click "Settings" → "Domains"
- Add your domain (e.g., yoursite.com)
- Railway shows DNS records
- Add those records to your registrar (same as Vercel)
Railway is slightly more powerful than Vercel (more control over environment variables, scaling), but for most sites, Vercel is simpler.
Option 3: Deploy to Netlify (Visual Deploy UI)
If you like a visual dashboard, Netlify is solid.
Step 1: Sign Up
- Go to netlify.com
- Sign up with GitHub
- Authorize Netlify
Step 2: Deploy
- Click "Add new site" → "Import an existing project"
- Select your GitHub repository
- Netlify auto-detects Next.js
- Click "Deploy site"
Netlify builds and deploys:
Status: Published
URL: https://your-site-xxxxx.netlify.app
Step 3: Connect Domain
- In Netlify, go to "Domain settings"
- Click "Add domain"
- Enter your domain
- Netlify shows DNS records
- Add to your registrar
Netlify is solid. Slightly more UI overhead than Vercel, but works great.
Option 4: Deploy to Your Own Server (Advanced)
If you own a server (AWS, DigitalOcean, Linode) and want to self-host:
Preparation
You need:
- A server running Node.js 18+ (Ubuntu 22.04 recommended)
- SSH access to that server
- A domain pointing to your server's IP
Deployment Steps
# SSH into your server
ssh user@your-server.com
# Install Node.js if not present
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install nodejs npm
# Create app directory
mkdir -p ~/apps/yoursite
cd ~/apps/yoursite
# Clone your GitHub repository
git clone https://github.com/yourname/your-site.git .
# Install dependencies
npm install
# Build Next.js app
npm run build
# Start server in production
npm start
# Server now runs on http://localhost:3000
But wait: Running the server directly is risky. Use a process manager like PM2:
# Install PM2
sudo npm install -g pm2
# Start your app with PM2
pm2 start npm --name "your-site" -- start
# Auto-restart on reboot
pm2 startup
pm2 save
Your site now runs in the background, auto-restarts if it crashes, and survives server reboots.
Point your domain:
- Get your server's IP address:
hostname -I - In your domain registrar, add an A record pointing to that IP:
Type: A
Name: @
Value: your.server.ip.address
Add SSL certificate (free with Let's Encrypt):
# Install Certbot
sudo apt install certbot python3-certbot-nginx
# Get certificate
sudo certbot certonly --standalone -d yoursite.com -d www.yoursite.com
# Use with Node.js (basic example)
# You'll need to set up a reverse proxy like Nginx
This is more complex but gives you full control.
Environment Variables & Secrets
Your site might need API keys, database URLs, or other secrets. Never commit these to GitHub.
For Vercel:
- In Vercel dashboard, go to project settings
- Click "Environment Variables"
- Add key-value pairs:
Key: DATABASE_URL
Value: postgresql://user:pass@db.host/dbname
Key: STRIPE_SECRET_KEY
Value: sk_live_xxxxxxxxxxxxx
- Redeploy for changes to take effect
For Railway/Netlify:
Same process in their dashboards under "Environment Variables" or "Secrets."
For self-hosted:
Create .env.production on your server:
DATABASE_URL=postgresql://user:pass@db.host/dbname
STRIPE_SECRET_KEY=sk_live_xxxxxxxxxxxxx
Never commit this to GitHub. Keep it on the server only.
Post-Deployment: Testing & Monitoring
Your site is live. Now verify it works:
Manual Testing
- Visit homepage on desktop — looks good?
- Visit homepage on mobile — responsive?
- Click all navigation links — no 404s?
- Fill out contact form — submission works?
- Check performance in DevTools (Lighthouse)
- Test on slow 3G to see real-world speed
Set Up Analytics (optional)
FORGE sites include built-in support for PostHog, Google Analytics, or similar.
Add to your Next.js config or component:
// pages/_document.tsx
<script async src="https://your-analytics-tracker.js"></script>
Popular options:
- Google Analytics (free, basic)
- Plausible ($30/month, privacy-focused)
- PostHog (free tier, product analytics)
- Vercel Analytics (integrates with Vercel)
Set Up Monitoring (recommended)
If your site has a backend or API, monitor it:
- Uptime monitoring: UptimeRobot (free) — alerts you if site goes down
- Error tracking: Sentry (free tier) — captures bugs in production
- Performance monitoring: New Relic or Datadog
For a basic static site with no backend, monitoring is overkill. For anything with APIs or user accounts, it's worth 15 minutes to set up.
Common Deployment Issues & Fixes
Issue: "Deployment failed"
Check the build logs in your hosting dashboard. Common causes:
- Missing environment variables
- Dependencies not installed (
npm install) - TypeScript errors
- Port conflicts
Fix: Check logs, update code locally, push again.
Issue: "Site loads but shows 404 on routes"
Make sure your hosting is configured for Next.js client-side routing. Vercel/Netlify do this automatically. Self-hosted needs proper server config.
Issue: "Site works at vercel.app but not at custom domain"
DNS hasn't propagated yet (can take 48 hours). Wait, or check DNS status at mxtoolbox.com.
Issue: "Images are broken on production"
Next.js requires next/image with proper width/height. If FORGE generated them correctly but they're broken, check:
- Image URLs are absolute (not relative)
- External image domains are allowed in next.config.js
Issue: "Site is slow in production"
Use Vercel Analytics or Google PageSpeed Insights to find bottlenecks:
- Large images → optimize
- Slow API calls → cache
- JavaScript bundles → code split
Updating Your Site Post-Launch
Once your site is live, you can keep improving it:
# Make changes locally
# Edit files, test
git add .
git commit -m "Update homepage copy"
git push origin main
# Vercel automatically deploys
# Site updates within 2-5 minutes
Every push triggers a new deployment. This is Vercel's superpower: continuous deployment without thinking about it.
The Complete Deploy Checklist
Before going live, verify:
- Content is proofread and accurate
- All links work (internal and external)
- Mobile responsive design tested
- Images load and are optimized
- Contact forms work end-to-end
- Meta tags are set (title, description, og:image)
- Site is fast (Google PageSpeed > 85)
- SSL certificate is active (lock icon in URL bar)
- DNS is pointing to the right place
- Monitoring/analytics configured (if needed)
- Automatic deployments working (push code, site updates)
Real Example: FORGE to Vercel in 5 Minutes
Here's what it actually looks like:
Minute 0: Generate site in FORGE, export to GitHub Minute 1: Create Vercel account, connect GitHub Minute 2: Click "Deploy" Minute 4: Vercel finishes building, gives you a .vercel.app URL Minute 5: Register custom domain, add Vercel DNS records
Result: Production site live at yoursite.com with SSL, global CDN, and auto-deploys.
That's it. Five minutes from code to production. No servers to manage. No Docker. No deployment scripts.
When to Use Each Hosting Option
| Option | Ease | Control | Cost | Best For |
|---|---|---|---|---|
| Vercel | Easiest | Medium | Free tier available | Most people, most sites |
| Railway | Easy | High | $5-50/month | Slightly more control than Vercel |
| Netlify | Easy | Medium | Free tier available | Teams that like visual dashboards |
| Self-hosted | Hardest | Full | $5-100/month | People who want complete control |
My recommendation: Start with Vercel. Free tier is generous. Scaling is easy. Deployment is automatic. You can always migrate later.
After Your Site Goes Live
Congratulations! Your AI-generated site is in production.
Now:
- Promote it — Share the link on social media, email, etc.
- Monitor it — Check that pages load, forms work, no errors
- Iterate — If you notice issues, fix them and push updates
- Extend it — As your business grows, add features (CRM integration, payments, etc.)
Your site is yours. The code is yours. The domain is yours. The infrastructure is yours (or rented from Vercel, which you can swap anytime).
That's code ownership in practice.
Troubleshooting Deployment
"I get 'Cannot find module' errors"
Run npm install locally, make sure package-lock.json or pnpm-lock.yaml is committed to GitHub.
"Site works locally but not on production"
Check environment variables are set. Check Node.js version matches (18+).
"Builds are slow"
Normal for first deploy (5-10 minutes). Subsequent deploys are faster (incremental builds).
"I want to rollback to a previous version"
Most hosting platforms keep deployment history. In Vercel, you can click "Promotions" and rollback with one click.
Next Steps
Your site is now live. Your code is live. You own it completely.
If you haven't deployed yet:
- Generate your site free at forgeyoursite.dev/generate
- Follow this guide to deploy to Vercel (easiest)
- Add your custom domain
- You're done
Want to add features later? Read how to extend your AI-generated site.