Menu

Deploy to Vercel

I've tested numerous deployment platforms and ultimately recommend using Vercel for deployment. At least for beginners, you should use Vercel deployment, as this can save you a significant amount of time and effort.

Besides Vercel, I also recommend trying Dokploy or Coolify, but these two platforms use Docker deployment, which means they cannot take advantage of edge runtime features.

Vercel Deployment Process

After registering with Vercel, locate the New Project button to begin deployment

New Project

At this step, you can either configure environment variables first or click the Deploy button directly to start deployment, then configure environment variables in the settings page after deployment completes.

Deploy

After successful deployment, navigate to the Settings page and open Environment Variables to configure your environment variables.

Environment Variables

After updating environment variables, you need to redeploy for the changes to take effect.

redeploy

Next, open the Domains page and click the Add Domain button. First, add the domain without the www prefix.

Add Domain
Add Domain
Add Domain
Add Domain
Add Domain

Go to Cloudflare to configure DNS by adding the following records:

A Record:
your-domain.com -> 76.223.126.88
Enable Proxy
 
CNAME Record:
www.your-domain.com -> cname-china.vercel-dns.com
Enable Proxy

Why not use the DNS address provided by Vercel? Because Vercel's DNS addresses are not accessible from China, while the DNS addresses provided above are accessible from China. After all, no one wants to exclude the Chinese market, right?

Configure Cloudflare SSL/TLS

On Cloudflare's SSL/TLS page, select Full (Strict) and enable Always Use HTTPS.

SSL/TLS

Good to know:

When using Vercel deployment, you must select Full (Strict), otherwise multiple redirects will occur, causing the site to become inaccessible.

always use https

Now you can access your product at the production URL.