Sven Luijten

Use different nameservers for a single subdomain

Published on 1 minute to read

For this website, I wanted a way to create so-called "review apps" so I can preview pull requests on preview-<PR> This turns out to be a built-in feature with Vercel, but their documentation instructed me to point's nameservers to theirs.

I wanted to find a way around this so that I could keep the nameservers for all my domains in Cloudflare. After a quick Google search, I came across the NS record you can add to your domain. This allows you to "delegate" the nameservers for a given (sub)domain down to another authoritative nameserver, like Vercel's.

Since I manage my DNS with DNSControl, I added an NS record for website.sven pointing to Vercel's nameserver:

    // ...

    NS('website.sven', ''),
    NS('website.sven', '')

This tells all traffic to and any subdomain (so <anything> to use Vercel's nameservers.