Fixing Apex Domain Issues on Next.js Vercel Deployment with Namecheap

I purchased a domain name from Namecheap to use for my Turborepo projects, which include two Next.js applications.

One is the main site, which should be accessible at monoed.africa, while the other is a subdomain project, accessible at cv-resume-builder.monoed.africa.

After deploying both projects separately on Vercel, I configured the domain settings as follows:

    • Type: A
    • Host: @
    • Value: 76.76.21.21
    • Type: CNAME
    • Host: www
    • Value: cname.vercel-dns.com

Vercel then refreshed and applied an SSL certificate.

However, a problem arose when accessing monoed.africa in the browser—it failed to load and showed a “cannot reach page” error.

Meanwhile, www.monoed.africa and the default monoed.vercel.app domain worked perfectly.

Problem Analysis

The issue was that the Apex domain (monoed.africa) was not correctly pointing to the Vercel deployment.

The A record (76.76.21.21) did not resolve correctly, causing the domain to be inaccessible without the “www.” prefix.

Many users I sent the domain to instinctively typed monoed.africa, expecting it to work, but it did not.

I had to find a solution to ensure the apex domain worked correctly.

Solution: Correcting the Namecheap DNS Settings

To fix the issue, I followed these steps:

1. Remove the Incorrect A Record

Vercel Incorrect Apex Namecheap Vercel Incorrect Apex Namecheap

2. Add a CNAME Record for the Apex Domain

3. Ensure the www Subdomain Record is Set Correctly

4. Configure Redirects in Vercel

5. Check DNS Propagation

6. Subdomain Setup for the Secondary Next.js Project

For the second project (cv-resume-builder.monoed.africa), I added:

After these changes, both the apex domain and subdomains started working correctly.

In Summary

FAQs

1. Why wasn’t monoed.africa working without www?

The A record (76.76.21.21) didn’t resolve correctly, causing an issue with apex domain resolution.

Changing it to a CNAME pointing to the Vercel deployment fixed the problem.

2. What DNS records should I use for a Vercel deployment with a Namecheap domain?

3. How long does DNS propagation take?

DNS propagation can take up to 48 hours. Use DNS Checker to monitor changes.

4. How do I set up redirects between the apex domain and www subdomain on Vercel?

By following these steps, I was able to resolve the apex domain issue and ensure that both my apex and subdomains work correctly on Vercel.