How to Connect a BigRock Domain to Vercel: DNS, www and HTTPS
How to connect a BigRock domain to Vercel: set the A and CNAME records, fix Invalid Configuration, redirect www to root, and get https URLs in Next.js.
- Author
- Swagat Murmu
- Published
- Reading time
- 14 min
- Category
- Web Development
How to Connect a BigRock Domain to Vercel and Take Your Project Live#
To connect a BigRock domain to Vercel, add the domain in your Vercel project, then create an A record for @ and a CNAME record for www in BigRock's DNS Management page. Copy the exact values Vercel shows you. The work takes about 15–20 minutes. The waiting takes longer.
I bought my domain at BigRock, and my Next.js project was already deployed to Vercel from GitHub. I figured the last step would take five minutes. It didn't. I got two dashboards, a root domain plus a www version, an @ symbol that meant nothing to me, an IP address, a status that kept flipping between valid and invalid, an environment variable that made my sitemap print http://, and hours of waiting.
This is the guide I wish I'd had: what each piece means, what to click in Vercel, what to type into BigRock, and how to tell it worked. Haven't bought a domain yet? Start with How to Buy a Domain as a Beginner in India Without Overpaying on Renewals.
How Do You Point a BigRock Domain to Vercel? The Short Version#
Add both the root domain and the www version in Vercel, then recreate the records Vercel gives you inside BigRock.
- The records: one A record for
@and one CNAME forwww, both copied from your Vercel domain cards. - The time: 15–20 minutes of real work. Then DNS has to spread. BigRock's change took me roughly 5–6 hours to show up everywhere.
- The nameservers: leave BigRock's alone and you manage DNS in BigRock. Move to Vercel's and you manage it in Vercel, but BigRock's DNS panel stops applying.
- The main address: pick the root domain or
www, then redirect the other one to it. - The part people forget: set
NEXT_PUBLIC_SITE_URLto yourhttps://address in Vercel and redeploy. Skip it and your sitemap, Open Graph tags and RSS feed keep printinghttp://URLs.
What Do You Need Before You Start?#
You need a Next.js project already deployed on Vercel, a domain you own, and your BigRock login.
- A Next.js project in a GitHub repo, imported into Vercel, with a
.vercel.appaddress that already loads. - A domain you own. Mine is
serversidestory.com, bought at BigRock. - Access to the domain's DNS Management page in BigRock.
- Optional: a terminal for the checks. Windows has
nslookupbuilt in. macOS and Linux also havedig.
What Do an Apex Domain, a Subdomain, an A Record and a CNAME Actually Mean?#
An apex domain is the bare name with nothing in front of it (serversidestory.com). A subdomain is anything attached to the front, like www.
That split matters because DNS treats the two as separate names. Set up one and the other stays broken. A and CNAME records are the two kinds of DNS entry you'll use to point both names at Vercel.
| Term | What it means in plain words |
|---|---|
Apex domain (root, @) | The bare domain: serversidestory.com. DNS panels write it as @. |
Subdomain (www) | www.serversidestory.com. To the internet it's a different name from the root domain, so it needs its own setup. |
| A record | Points a name to an IP address, a number like 216.198.79.1. Used for the apex domain. |
| CNAME record | Points a name to another name. Used for www. An apex domain can't use a CNAME. |
| Nameservers | The servers that answer DNS questions for your domain. Wherever they point is where your records have to live. |
| DNS propagation time | How long it takes cached answers around the world to catch up with your change. |
Here's the mental model that finally made it click for me:
- Vercel tells you which records your domain needs. If your DNS lives at BigRock, it won't create them for you.
- BigRock is where you create those records, because BigRock's nameservers answer for your domain.
Leave this unsolved and visitors hit an error instead of your site. www may fail while the root works, or the reverse. Your sitemap and social previews can also advertise the wrong http:// address.
How Do You Connect a BigRock Custom Domain to a Next.js Project on Vercel?#
Check the project on its Vercel address, set your HTTPS site URL, add both domains in Vercel, create the records in BigRock, then wait and verify. Eight steps, and most of them take under two minutes.
Step 1: Does Your Project Load on Its .vercel.app Address?#
It should, before you touch DNS. Open your project's .vercel.app URL in a browser.
If it loads, your code and deployment are fine. Anything that breaks from here is a DNS problem, not an app problem. That one check has saved me hours of guessing. If it doesn't load, fix the deployment first.
You don't need to change any code just to attach a domain.
Step 2: How Do You Set Up the NEXT_PUBLIC_SITE_URL Environment Variable in Vercel?#
In Vercel, open Settings → Environment Variables and add NEXT_PUBLIC_SITE_URL for the Production environment, set to your final https:// address.
If your app builds absolute URLs from that variable, it matters. Mine generated http:// links in the sitemap, Open Graph tags and RSS feed because the value was wrong. Do it now, before the domain goes live.
Local development file (don't commit it):
# .env.local
NEXT_PUBLIC_SITE_URL=http://localhost:3000
Production value in Vercel:
NEXT_PUBLIC_SITE_URL=https://serversidestory.com
A minimal helper that reads it, with no trailing slash:
// lib/site.ts
const DEFAULT_SITE_URL = "http://localhost:3000";
export const SITE_URL = (process.env.NEXT_PUBLIC_SITE_URL ?? DEFAULT_SITE_URL).replace(/\/+$/, "");
export function absoluteUrl(path = "/"): string {
return `${SITE_URL}${path.startsWith("/") ? path : `/${path}`}`;
}
Two things worth knowing:
- Vercel warns you about any variable starting with
NEXT_PUBLIC_, because those values get exposed to the browser. A site URL is public anyway, so ignore the warning here. Never put secrets, like a database key with write access, in aNEXT_PUBLIC_variable. NEXT_PUBLIC_values are baked in at build time. After changing one, redeploy (Deployments → the three-dot menu → Redeploy, or push a new commit). Until you do, the old value stays live.
Step 3: How Do You Add an Existing BigRock Domain in Vercel?#
Open your project, go to Settings → Domains, click Add Existing Domain, and enter your domain. Don't click Buy. You already own it.
- Add
serversidestory.com. - Add
www.serversidestory.com.
Vercel now shows a card for each domain with the DNS records it expects, plus a status. At first the status is usually Invalid Configuration. That only means "I can't see the right records yet." Your project is fine.
Read each card carefully. Mine showed 216.198.79.1 as the A-record value for the root domain. Plenty of older tutorials show 76.76.21.21. Both are Vercel addresses, and Vercel's documentation explains that newer projects can be assigned a different address from a pool. Use the value on your own card, not the one in a blog post. That includes this one.
For www, the card shows a CNAME target. Older guides say cname.vercel-dns.com. Newer projects can get a project-specific target: a random string followed by .vercel-dns-017.com. Copy exactly what your card shows.
Step 4: Do You Need to Change BigRock Nameservers for Vercel?#
No. You can leave BigRock's nameservers exactly as they are and add the records in BigRock's DNS Management. Switching to Vercel's nameservers is optional.
| Option | What you do | Pros | Cons |
|---|---|---|---|
| A. Keep BigRock nameservers | Add the A and CNAME records in BigRock's DNS Management | Smallest change, nothing else moves | Two dashboards to keep in sync |
| B. Use Vercel's nameservers | In BigRock, change the nameservers to ns1.vercel-dns.com and ns2.vercel-dns.com, then manage records in Vercel | One place for everything | BigRock's DNS records stop applying, so copy any existing records first, especially MX and TXT records for email |
My domain started on BigRock's nameservers (dns1.bigrock.in to dns4.bigrock.in). I picked option A. Once the site worked, I left it alone. No reason to touch nameservers or delete a working record.
Don't mix the two. If your nameservers point to Vercel, records you add at BigRock are ignored. If they point to BigRock, records you add in Vercel's DNS panel are ignored. And if you ever switch and forget your MX and TXT records, email on that domain can stop working.
Step 5: What Records Do You Add in BigRock DNS Management?#
Add one A record for @ and one CNAME record for www, using the values from your Vercel cards. Panel wording varies a little, but the fields are the same.
| Type | Host / Name | Value / Points to |
|---|---|---|
| A | @ | The IP from your Vercel card (mine: 216.198.79.1) |
| CNAME | www | The target from your Vercel card for www |
A few rules that kept me out of trouble:
- Enter
@for the root domain and justwwwfor the subdomain. Some panels want the full name, so look at how existing records are displayed and match that style. - Remove or edit conflicting records. If BigRock already has an A record for
@pointing somewhere else (a parking page, say), two A records for one name can send some visitors to the wrong place. Keep only the Vercel one. - Don't add a CNAME for
@. The apex domain can't use one. That's why it gets an A record. - Copy values exactly, including any trailing dots your panel shows.
Save the records. If the site doesn't work yet, nothing's wrong.
Step 6: How Long Does BigRock DNS Propagation Take for Vercel?#
Anywhere from a few minutes to 24–48 hours. For me, DNS propagation time on BigRock was roughly 5–6 hours before everything worked.
It's slow because servers around the world cache old answers. Don't keep re-editing records while you wait. Change one thing, then wait. Otherwise you'll never know which edit did the job.
Check from your terminal instead of refreshing the browser. The 8.8.8.8 at the end asks Google's DNS directly, which skips your own computer's cache.
Windows (PowerShell or Command Prompt):
nslookup serversidestory.com 8.8.8.8
nslookup -type=CNAME www.serversidestory.com 8.8.8.8
ipconfig /flushdns
macOS or Linux:
dig +short A serversidestory.com @8.8.8.8
dig +short CNAME www.serversidestory.com @8.8.8.8
The first command should return the IP from your Vercel card. The second should return your www CNAME target. An old or unexpected value means the change hasn't spread yet, or a conflicting record is still sitting there.
Then go back to Vercel's Domains page and refresh. Once Vercel sees the right records, the status flips to Valid Configuration and Vercel issues the HTTPS certificate automatically.
Step 7: How Do You Redirect www to the Root Domain in Vercel?#
In Settings → Domains, edit the www domain and redirect it to your root domain with a permanent redirect. To go the other way, edit the root domain instead.
Visitors can reach your site at both serversidestory.com and www.serversidestory.com, but search engines count those as two different addresses. Pick one as your main address and redirect the other. I use the root domain as my main address, so www redirects to it. Whichever you pick, use that same address in NEXT_PUBLIC_SITE_URL.
Step 8: How Do You Check That the Domain Is Live?#
Open each address in a private window:
https://serversidestory.comloads your site with a padlock.https://www.serversidestory.comloads, or redirects to your main address.http://serversidestory.comredirects tohttps://. Vercel does this on its own once the certificate exists.
I tested the homepage, About page, Contact page and sitemap on the live domain. Then I checked the generated URLs, which is the next section.
How Do You Fix the Vercel Invalid Configuration Error with BigRock?#
Compare each record in BigRock against the card in Vercel, character by character. Then look for conflicting records and confirm where your nameservers point.
Most of the time, Invalid Configuration means Vercel can't see the expected records yet. It isn't a bug in your project.
| Vercel shows | What it means | What to check |
|---|---|---|
| Valid Configuration | Vercel can see the records it expects | Nothing. Test the site in a browser. |
| Invalid Configuration | Vercel can't see the expected records, yet | Compare your records to the Vercel card. Look for a conflicting old record. Check the nameservers. Then wait for DNS to spread. |
Root valid, www invalid | The www domain is missing, or its CNAME is wrong | Confirm www was added in Vercel and that the CNAME sits in the same DNS panel as the A record. |
If the records match and nslookup returns the right values but Vercel still shows invalid, give it more time and refresh the Domains page.
How Do You Fix Next.js Sitemap URLs That Show http Instead of https on Vercel?#
Set NEXT_PUBLIC_SITE_URL to your https:// address for Production, then redeploy. The value is baked in at build time, so nothing changes until the next deployment.
To check, run these two commands. On Windows, use curl.exe instead of curl:
curl -I https://serversidestory.com
curl -s https://serversidestory.com/sitemap.xml
Every loc entry in the sitemap should start with https://. So should your Open Graph tags and RSS feed. If you still see http://, you either skipped the redeploy from Step 2 or the variable still holds the old value. Open Settings → Environment Variables, confirm it's set for Production, and redeploy.
What Mistakes Break a BigRock-to-Vercel Setup?#
Five mistakes cause most of the trouble: trusting tutorial values, leaving a duplicate A record, mistyping the host field, testing from one machine, and mismatching the main address.
Using values from a tutorial. My Vercel card showed 216.198.79.1 while many guides show 76.76.21.21. Both can be valid. Your card is the one that counts.
Leaving two records for the same name. An old A record for @ can send some visitors to the wrong server. Keep one.
Typing the full domain in the host field. Entering www.serversidestory.com where the panel expects www can create a record for a name that doesn't exist. Match the style of the records already in the panel.
Testing from one machine and trusting it. Your computer and browser cache DNS. Use a private window, run nslookup against 8.8.8.8, and try your phone on mobile data.
Picking a main address that doesn't match your env var. If www is your main address in Vercel but NEXT_PUBLIC_SITE_URL holds the root domain, your sitemap and canonical tags point to an address visitors never land on.
Frequently Asked Questions#
Do I need to redeploy my Next.js project to connect a domain?#
No. Attaching a domain needs no code change and no redeploy. Only changing a NEXT_PUBLIC_ environment variable needs a new build.
Should my main address be the root domain or www?#
Either works. Pick one, redirect the other to it, and use that same address in NEXT_PUBLIC_SITE_URL. I chose the root domain.
Why is my Vercel A-record IP different from the one in tutorials?#
Vercel can assign different addresses to different projects. Use the value shown on your project's domain card.
Do I need to buy the domain through Vercel?#
No. Use Add Existing Domain and keep your registrar. Don't click Buy.
Is HTTPS free on Vercel?#
Yes. Vercel issues the certificate automatically once your DNS is valid, so you don't buy or install one.
Can I move my DNS to Cloudflare later?#
Yes. Add the domain to Cloudflare, recreate your records there (A for the root, CNAME for www), then change the nameservers at BigRock. The same check-and-wait process applies.
Final Checklist#
- The
.vercel.appURL loads before you touch DNS. -
NEXT_PUBLIC_SITE_URLis set to yourhttps://address for Production, and the project is redeployed. - The root domain and
wwware added in Vercel through Add Existing Domain. - BigRock has an A record for
@and a CNAME forwww, copied from the Vercel cards, with no conflicting records. -
nslookupordigreturns the expected values. - Vercel shows Valid Configuration for both domains.
- One address is your main one, and the other redirects to it.
- Both
https://addresses load, andhttp://redirects. - The sitemap, Open Graph tags and RSS feed contain
https://URLs.
Conclusion and Further Reading#
Three things get a BigRock domain live on Vercel: Vercel tells you the records, BigRock's DNS panel is where you create them, and NEXT_PUBLIC_SITE_URL has to match your final https:// address. Change one thing at a time, check with nslookup, and give DNS room to spread. Search-engine and analytics setup come next, but those are separate jobs.
Further reading:
Share this article
Found this useful? Share it with others.