Complete Notes on Binding a Custom Domain to My Personal Website
I recently went through the full process of binding my own domain to this personal website. I am writing down the notes while the details are still fresh, because this is exactly the kind of setup that feels simple after it works, but confusing when one DNS record is wrong.
1. Background
The original pain point was simple: my personal website had already been deployed on Vercel in the United States, but after returning to China, the default xxx.vercel.app address could not be opened reliably.
The key lesson: this was not a code problem and not a deployment problem. The website itself was working. The issue was access to the default vercel.app subdomain, which can be affected by DNS pollution and international network restrictions from inside mainland China.
So the practical solution was to bind my own domain name to the Vercel project.
2. Full Reproducible Setup
2.1 Prerequisites
I already had:
- A Vercel project:
https://vercel.com/chengshuo-dai/personal-website - A purchased domain:
lucasdai.cn - DNS management through Tencent Cloud DNSPod
In my case, the site is hosted outside mainland China, so I did not go through an ICP filing for this setup. This is a personal deployment note rather than legal advice; domain and hosting compliance rules should always be checked against the current platform and local requirements.
2.2 Add the Custom Domain in Vercel
Inside Vercel:
- Open the project.
- Go to Settings -> Domains.
- Enter the domain:
lucasdai.cn. - Optionally enable Redirect apex to www.
- Click Add Domain.
The redirect option means the root domain lucasdai.cn can automatically redirect to www.lucasdai.cn. This is useful because it gives the site one canonical address instead of treating the root domain and the www subdomain as two separate versions of the same website.
2.3 Configure DNS Records in Tencent Cloud DNSPod
After adding the domain, Vercel shows the DNS records it expects. In my setup, I added two records in DNSPod:
| Record Type | Host Record | Record Value | TTL | Purpose |
|---|---|---|---|---|
| A | @ | 216.198.79.1 | 600 | Points the apex domain lucasdai.cn to Vercel |
| CNAME | www | cname.vercel-dns.com | 600 | Points www.lucasdai.cn to Vercel |
Important note: the Vercel UI should be treated as the source of truth for the exact DNS value. The IP I used was 216.198.79.1, but if Vercel shows a different value in the future, use the value displayed by Vercel.
2.4 Verify the Setup
After saving the DNS records:
- Go back to the Vercel Domains page.
- Click Refresh.
- Wait for the status to move from Invalid Configuration to Valid Configuration.
- Wait for the SSL status to move from Generating SSL Certificate to Issued.
- Open both:
https://lucasdai.cn/https://www.lucasdai.cn/
When the browser can open the site and the address bar shows the lock icon, the domain and HTTPS setup are working.
3. Concepts I Finally Understood
3.1 308 Permanent Redirect
A 308 Permanent Redirect tells browsers and search engines that a URL has permanently moved to another URL.
In my case, after enabling the apex-to-www redirect, visiting lucasdai.cn redirects to www.lucasdai.cn. This avoids splitting the same site across two addresses and helps search engines understand the canonical version.
The key point is that this is not an error. It is expected behavior when one domain is configured to be the canonical entry point.
3.2 SSL Certificate
An SSL/TLS certificate enables HTTPS. It encrypts traffic, helps prevent tampering, and proves that the site is being served for the domain owner.
In this setup, Vercel automatically requested, deployed, and renews the certificate. I did not need to manually download or upload any certificate file.
Seeing Generating SSL Certificate in Vercel is normal. After a few minutes, it should become Issued.
3.3 TTL 600
TTL means Time To Live. It controls how long DNS results can stay cached by DNS resolvers.
My DNS records used 600, which means 600 seconds, or 10 minutes. After changing a DNS record, some networks may continue using the old result until the cache expires.
For this setup, 600 is a normal value. I did not need to change it.
3.4 Apex Domain vs. WWW Subdomain
The apex domain is:
lucasdai.cn
The www subdomain is:
www.lucasdai.cn
The apex domain is shorter and works well for a personal brand. The www version is a traditional web convention and is still widely used.
The practical recommendation is to choose one as the canonical domain and redirect the other one to it. There is no need to keep both as independent entry points for the same site.
3.5 Domain, Server, and Website
The relationship finally became clear to me:
| Concept | Analogy | Notes |
|---|---|---|
| Domain | Street address | A globally unique name that points users to a destination |
| Server | House | One server can host many websites |
| Website | Room inside the house | One website can be reached through multiple domains |
| DNS record | Road from address to house | An A or CNAME record tells DNS where a host should point |
A website does not require one dedicated domain. One domain can support many subdomains:
lucasdai.cnfor the main siteblog.lucasdai.cnfor a bloglab.lucasdai.cnfor experiments
These do not require buying new domains.
A domain also does not have to point to only one server. Different subdomains can point to different services:
- The main site can point to Vercel.
- An API service can point to a separate cloud server.
- A demo project can point to another deployment platform.
This is why DNS is such a powerful layer. It separates the human-readable address from the actual infrastructure behind it.
4. Takeaway
The most important lesson from this setup was that deployment success and accessibility are not always the same thing.
Vercel had already deployed the website correctly. The real issue was that the default Vercel subdomain was not reliably accessible from my network environment. Binding a custom domain gave me a stable public entry point and also made the website feel more professional.
The final working setup was:
- Domain purchased from Tencent Cloud:
lucasdai.cn - DNS managed in DNSPod
- Website deployed on Vercel
- Apex domain pointing to Vercel through an A record
wwwpointing to Vercel through a CNAME record- HTTPS certificate automatically managed by Vercel
This is now my reusable checklist for future personal projects.