Porkbun domain to Vercel or Railway: DNS records step by step
Point a Porkbun domain at Vercel or Railway: delete the pixie.porkbun.com parking records, add an A or ALIAS on the root and a CNAME on www.
The short answer
To point a Porkbun domain at Vercel or Railway, first delete Porkbun's default parking records, the ones whose answer is pixie.porkbun.com. For Vercel, add an A record with a blank host and the IP from your project's Domains screen, plus a CNAME on www. For Railway, use Porkbun's "ALIAS - CNAME flattening" record on the blank host, a CNAME on www, and the TXT records Railway shows.
You can keep Porkbun as both registrar and DNS host for either platform. Moving the nameservers to Cloudflare is optional, and only worth it if you want Cloudflare's proxy, redirect rules or email routing in front of the app.
The records, side by side
Porkbun's DNS form has a Host field that you leave empty for the bare domain. Everything else follows from that one rule.
| Host field at Porkbun | Vercel | Railway |
|---|---|---|
| (blank) for the bare domain | A record, IPv4 from Settings, Domains | ALIAS - CNAME flattening, answer is Railway's target |
www | CNAME to your project's target | CNAME to the target Railway shows for www |
| Verification | TXT on _vercel, only if Vercel asks | TXT record for each domain, name and value as shown |
* wildcard | Delete the parking CNAME unless you need it | Delete the parking CNAME unless you need it |
| MX and SPF TXT | Leave alone | Leave alone |
Clear the parking records first
A new Porkbun domain is not empty. Porkbun adds default records whose value is pixie.porkbun.com, and they serve the parking page you see when you visit the name. If you try to add your host's CNAME or ALIAS while they are still there, Porkbun refuses with an error.
Porkbun's fix is simple: delete every record that points to pixie.porkbun.com, then add the host's records again. If there are no pixie records and the error still appears, an older record from a previous host occupies the same Host value. Delete that one instead.
Two things to leave in place. The MX records fwd1.porkbun.com and fwd2.porkbun.com and the SPF TXT record run Porkbun's email forwarding, so keep them if you use it. Also avoid the Park Domain option in the Details menu as a way to tidy up. Porkbun's guide says parking removes the ALIAS, CNAME, A and AAAA records for the root, www and the wildcard, which takes the app offline.
Could not add DNS record: A CNAME or ALIAS record with that host already existsVercel: tallyfern.com on Porkbun DNS
- In Vercel, open the project, then Settings, then Domains, and add
tallyfern.com. Accept the suggestion to addwww.tallyfern.comtoo, and choose which one redirects to the other. - Vercel now lists the records it expects. Its docs say an apex domain is configured with an A record and a subdomain with a CNAME, and that each project has its own CNAME target. Copy both values from this screen, not from another project.
- At Porkbun, open Domain Management and click the DNS button under the domain name. The Manage DNS Records menu opens.
- Delete the records that point to
pixie.porkbun.com. - Click Add Record. Set Type to "A - Address record", leave Host blank, paste Vercel's IP into the IPv4 Address field and click Add.
- Add a second record: Type CNAME, Host
www, Answer set to the project's CNAME target. Leave TTL at Porkbun's default. - If Vercel also shows a TXT record on
_vercel, the domain was used in another Vercel account or team. Add it at Porkbun with Host_vercel. It proves access without moving the domain. - Return to Vercel's Domains page. Both names should change to a valid configuration once Vercel sees the records.
Railway: kilnmark.com on Porkbun DNS
Railway gives each custom domain a CNAME target, such as abc123.up.railway.app, and a TXT record for ownership. Its docs are explicit that both are needed. Without the TXT record, requests to the custom domain return a 404 even after the CNAME resolves.
A CNAME is not allowed on a bare domain, so Railway asks for CNAME flattening or a dynamic ALIAS record there. Porkbun offers exactly that. Its guide for hosts that give a hostname instead of an IP uses an ALIAS record with a blank host for the root and a CNAME on www.
For kilnmark.com, add the bare name and www.kilnmark.com as custom domains in the Railway service. Then add these records at Porkbun:
- Type "ALIAS - CNAME flattening", Host blank, Answer set to the target Railway shows for
kilnmark.com. - Type CNAME, Host
www, Answer set to the target Railway shows forwww.kilnmark.com. - Each TXT record Railway lists, with the Host and value copied exactly. Railway will not verify a domain without it.
- Once the records are right, Railway issues a Let's Encrypt certificate. Its docs say this should happen within an hour of the DNS update.
Should you move the nameservers to Cloudflare?
Porkbun's DNS covers what Vercel and Railway need, so moving is a choice, not a requirement. Move if you want Cloudflare's proxy and firewall, its redirect rules, or Cloudflare Email Routing. Stay if you rely on Porkbun's email forwarding or URL forwarding, because Porkbun warns that changing nameservers usually breaks Porkbun-hosted services.
To move, add the domain to Cloudflare and check that its scan picked up every record, especially MX and TXT. Then at Porkbun open Details, click the edit icon by Nameservers, remove all existing entries, paste Cloudflare's two names one per line, click Save Nameservers and confirm with Submit. Porkbun says the change can take up to 48 hours, and most places see it within a few hours.
If you switched on the Porkbun DNSSEC toggle earlier, turn it off before the move. Cloudflare's docs ask you to disable DNSSEC at the registrar before changing nameservers, otherwise the domain fails to resolve.
Check it from outside
Ask a public resolver rather than your browser, which may still hold the parking page. The bare domain should return only your host's address, and nothing should mention pixie.porkbun.com.
# who answers for the domain: Porkbun or Cloudflare?
dig NS kilnmark.com +short
# bare domain: Vercel's IP, or the flattened Railway address
dig @1.1.1.1 kilnmark.com A +short
# www: the host's CNAME target
dig @1.1.1.1 www.kilnmark.com CNAME +short
# Windows without dig
nslookup -type=cname www.kilnmark.com 1.1.1.1If it still does not work
- Porkbun refuses the new record: a pixie or older record still holds that Host value. Delete it first.
- Some visitors see the Porkbun landing page: an old A or ALIAS record sits beside the new one, or a resolver cached the old answer. Remove the extra record and wait out its TTL.
- Vercel shows an invalid configuration: its troubleshooting table points to conflicting A, AAAA or CNAME records on the same name. Leave one record per name.
- Railway keeps waiting: the TXT record is usually missing or pasted into the wrong Host. Our guide to Railway's "Waiting for DNS update" covers the other causes.
- Everything vanished after you parked the domain: the Park Domain option removed the web records. Add them again.
Doing it on launch
Shipyard runs DNS on Cloudflare, so with a Porkbun domain the one manual step is changing the nameservers at Porkbun. After that it adds the domain at Railway or Vercel and writes the records each host asks for. The provider notes list what it needs from each account.
Sources
- Porkbun Knowledge Base: How to Fix the "Could not add DNS record: A CNAME or ALIAS record with that host already exists" Errorkb.porkbun.com
- Porkbun Knowledge Base: How to Add DNS Records on Porkbunkb.porkbun.com
- Porkbun Knowledge Base: How to connect your root domain when your web host won't provide an IP addresskb.porkbun.com
- Porkbun Knowledge Base: How to reset DNS and park your domainkb.porkbun.com
- Porkbun Knowledge Base: How to Change Nameserverskb.porkbun.com
- Vercel docs: Adding & Configuring a Custom Domainvercel.com
- Railway docs: Working with Domainsdocs.railway.com
- Cloudflare docs: DNSSECdevelopers.cloudflare.com
Launch in an hour, not a weekend
Shipyard connects your accounts once, then sets up the domain, hosting, database, email and payments for every new product.