How I Made My Vercel Site 3-8x Faster in China for $6/Month
Vercel is brilliant — until your Chinese users complain that your site takes 8 seconds to load. Here's how I fixed it for $6/month with a Hong Kong server, zero ICP filing, and kept all Vercel features intact.
The Problem: Vercel Is in America
Vercel's edge network is global, but "global" has a massive hole: mainland China. Their CDN nodes sit in the US, Japan, Singapore — everywhere except where the Great Firewall matters most.
For international SaaS products targeting Chinese users, this creates a real business problem:
- First Contentful Paint: 2-4 seconds (US users: 0.5s)
- Full page load: 5-10 seconds
- Bounce rate: Through the roof
The commercial solutions (Cloudflare China Network, Vercel Enterprise with custom arrangements) start at $50-200+/month and often require ICP filing — a months-long process that needs a Chinese business entity.
I needed something simpler.
The Solution: Hong Kong Proxy
The architecture is straightforward:
Chinese users → Hong Kong VPS (Nginx) → Vercel
International users → Vercel directly (unchanged)
Hong Kong is the sweet spot: close enough to mainland China for under 50ms latency, but outside the firewall so no ICP filing is needed. A basic VPS costs $5-10/month.
Final Setup
Asia traffic → 43.xxx.xx.xxx (HK VPS) → yourapp-origin.example.com (CNAME → Vercel)
Global traffic → 76.76.21.21 (Vercel's static IP)
Why the -origin subdomain? Vercel requires a CNAME for custom domains, but Route 53's geolocation routing needs A records. You can't mix both on the same subdomain. The workaround: create yourapp-origin.example.com pointing to Vercel via CNAME, then have Nginx proxy to that.
Step 1: Get a Hong Kong VPS
I used Tencent Cloud International's Lighthouse service — $6/month for a basic Ubuntu 24.04 instance in Hong Kong. Similar options:
- Vultr Hong Kong: $6/month
- DigitalOcean Singapore: $6/month (slightly higher latency)
- Alibaba Cloud Hong Kong: $4-10/month
Requirements:
- Ubuntu 22.04+ or Debian 11+
- 1 vCPU, 1GB RAM (enough for Nginx)
- Public IPv4 address
SSH in with the default user (usually ubuntu, not root):
ssh ubuntu@your-hk-server-ip
Step 2: Set Up the Origin Subdomain
In your DNS provider (I use Route 53, but Cloudflare DNS works too):
- Create
yourapp-origin.example.comas a CNAME pointing tocname.vercel-dns.com - In Vercel Dashboard → Domains, add
yourapp-origin.example.com - Wait for Vercel to verify the domain (usually instant with CNAME)
This gives you a Vercel-hosted endpoint that Nginx can proxy to.
Step 3: Install Nginx and Certbot
sudo apt update && sudo apt upgrade -y
sudo apt install nginx certbot python3-certbot-nginx -y
Start Nginx and enable it on boot:
sudo systemctl start nginx
sudo systemctl enable nginx
Open ports 80 and 443 in your VPS firewall (security group):
# If using ufw
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Step 4: Configure Nginx Reverse Proxy
Create the site configuration:
sudo nano /etc/nginx/sites-available/yourapp.example.com
Paste this configuration:
server {
listen 80;
server_name yourapp.example.com;
location / {
proxy_pass https://yourapp-origin.example.com;
proxy_ssl_server_name on;
proxy_set_header Host yourapp-origin.example.com;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
# WebSocket support (for Next.js HMR in dev, optional)
proxy_http_version 1.1;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection "upgrade";
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
}
Enable the site:
sudo ln -s /etc/nginx/sites-available/yourapp.example.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 5: Add SSL with Let's Encrypt
sudo certbot --nginx -d yourapp.example.com
Follow the prompts. Certbot will:
- Obtain an SSL certificate
- Modify your Nginx config to serve HTTPS
- Set up auto-renewal
Verify auto-renewal works:
sudo certbot renew --dry-run
Your Nginx config will now include SSL settings and redirect HTTP to HTTPS.
Step 6: Configure Geolocation Routing
This is where the magic happens. You want:
- Asian users → Hong Kong VPS IP
- Everyone else → Vercel directly
Route 53 Setup
- Go to Route 53 → Hosted Zones → your domain
- Delete any existing A/CNAME records for
yourapp.example.com - Create two A records for
yourapp.example.com:
Record 1 (Asia):
- Type: A
- Value:
43.xxx.xx.xxx(your HK VPS IP) - Routing policy: Geolocation
- Location: Asia
- Record ID:
yourapp-asia
Record 2 (Default/Global):
- Type: A
- Value:
76.76.21.21(Vercel's static IP) - Routing policy: Geolocation
- Location: Default
- Record ID:
yourapp-default
Note:
76.76.21.21is Vercel's official static IP for A records. See Vercel's documentation for current IPs.
Cloudflare DNS Alternative
If using Cloudflare:
- Use Cloudflare Load Balancing with geo-steering (requires paid plan)
- Or use a third-party GeoDNS service like NS1 or Constellix
Step 7: Verify It Works
Test from different locations:
# From your machine (probably outside China)
curl -I https://yourapp.example.com
# Check DNS resolution from different regions
dig yourapp.example.com @8.8.8.8
For China testing:
- Use a Chinese VPN endpoint
- Ask a friend in China to run speed tests
- Services like 17ce.com or chinaz.com for synthetic monitoring
Expected Results
| Location | Before | After |
|---|---|---|
| Shanghai | 4-8s | 0.8-1.5s |
| Beijing | 5-10s | 1-2s |
| Hong Kong | 2-3s | 0.3-0.5s |
| US/EU | 0.5-1s | 0.5-1s (unchanged) |
Caveats and Gotchas
1. SSL Certificate on Both Ends
The HK server terminates SSL from users, then makes a new HTTPS connection to Vercel. This is fine for most apps but adds ~20ms latency vs edge caching.
2. Vercel Analytics
User IPs in Vercel Analytics will show the HK server's IP for Asian traffic. If you need real IPs, parse X-Forwarded-For headers in your app.
3. This Isn't a CDN
Static assets are still fetched through the proxy. For heavy static content, consider:
- Adding
proxy_cachedirectives to Nginx - Using a Chinese CDN for static assets (requires ICP for .cn TLD)
4. Single Point of Failure
The HK VPS is now critical infrastructure for Chinese users. Consider:
- Automated health checks
- Backup VPS in another HK region
- Monitoring with UptimeRobot or similar
5. Vercel's IP May Change
76.76.21.21 is Vercel's documented static IP, but verify it periodically. The CNAME approach (cname.vercel-dns.com) is more stable but incompatible with root domains + geolocation routing.
Cost Breakdown
| Item | Monthly Cost |
|---|---|
| Tencent Cloud HK Lighthouse | $6 |
| Route 53 Hosted Zone | $0.50 |
| Route 53 Queries | ~$0.40 (per million) |
| Let's Encrypt | Free |
| Total | ~$7/month |
Compare this to:
- Cloudflare China Network: $200+/month
- Custom CDN setups: $50-100+/month
- Vercel Enterprise arrangements: Varies, $$$
When This Solution Isn't Enough
This works great for:
- SaaS products with Chinese customers
- Marketing sites needing decent China performance
- Apps where 1-2s load time is acceptable
For apps needing under 500ms load times in China, you'll eventually need:
- ICP filing + Chinese CDN
- China-hosted infrastructure
- A proper multi-region deployment
But for most international products just starting to see Chinese traffic, a $6/month Hong Kong proxy gets you 80% of the way there.
Wrapping Up
The key insight: you don't need expensive enterprise solutions to make Vercel sites usable in China. A cheap Hong Kong VPS, some Nginx config, and smart DNS routing gets you 3-8x faster load times for under $10/month.
Total setup time: about 30 minutes.
The Chinese internet is its own beast, but this proxy pattern works for any US-hosted service you need to make faster in Asia. I've used the same approach for API endpoints, webhook receivers, and internal tools.
If your Chinese users are complaining about speed, try this before committing to expensive alternatives. You might be surprised how far $6 gets you.
Want to work together?
I'm always happy to connect — whether it's a project, a question, or just to say hi.
Get in Touch →