|
Hi. I have a domain name that I bought from a domain name provider and I setup Cloudflare as my DNS provider. I added my domain name to my vercel project as a wildcard domain name. I'm basing my project on https://vercel.com/guides/nextjs-multi-tenant-application#5.-deploy-to-vercel |
Replies: 5 comments 27 replies
|
Edit: See latest answer here: #7739 (reply in thread) |
|
P.S. we have new docs for nameservers! https://vercel.com/docs/concepts/projects/domains/managing-nameservers |
|
@amyegan, when using Cloudflare as my domain registrar, is it impossible to use Vercel wildcard domains? I cannot edit my nameservers in Cloudflare but can add NS records in Cloudflare, so is it possible to add wild card support using these NS records? |
|
For those who landed on this old community post, let me update the previously marked answer, as it contains some inaccurate information as of today. First of all, you can use a wildcard domain on your Vercel project with Cloudflare name servers. Our documentation, as well as the UI's error message, are somewhat misleading, but you can "ignore" the error message as long as you follow the below steps. 1. Add your wildcard domain to your projectFirst, you add 2. Issue your wildcard TLS certificate via Vercel CLIThis is the most crucial step. Since we use Let's Encrypt certificates, there are two ways to verify your domain ownership: Because this is a "wildcard" certificate, you can only verify via the DNS-01 challenge mentioned in the above documentation. This is why we initially said it's necessary to change the name servers so that we can automatically handle this DNS-01 challenge on our side without having you manually create a verification TXT DNS record. But that's not a hard requirement. You can still do this DNS-01 challenge manually using the Vercel CLI: $ vercel certs issue "*.example.com" --challenge-only
Vercel CLI 28.12.6
> A certificate issuance for *.example.com has been started [2s]
Add the following TXT records with your registrar to be able to the solve the DNS challenge:
name type value
_acme-challenge TXT YN7LvYccJ0Xlrih9lIb--gcgH8OzlsD4POWf15XtrDc
> To issue the certificate once the records are added, run:
`vercel certs issue *.example.com`
Read more: https://err.sh/vercel/solve-challenges-manually
$ vercel certs issue "*.example.com"
Vercel CLI 28.12.6
> Success! Certificate entry for *.example.com created [6s]^^ This is the example output. You can then create a new TXT record via the Cloudflare DNS interface with the provided value. [Important Note] Because Let's Encrypt certificates have 90 days expiration period, and you will need a new verification challenge signature for the certificate auto-renewal, you have to follow the same step and re-issue the certificate and update the TXT record with the new verification signature before the cert expires. Please see my follow-up comment below for more details. 3. Create a wildcard DNS entry in CloudflareOnce step 2 is completed, you can add a new wildcard DNS entry via the Cloudflare DNS interface, and point it to our shared CNAME hostname 4. (Optional) Disable warning notifications (UI's Inbox notification/Email)Note that because of how we're checking the domain's name servers today, the Until we have better UI/UX around this name server check, you can disable warning notifications via https://vercel.com/account/notifications so we won't bother you.
|





For those folks landing this page today, we now have a workaround allowing you to set up and renew your wildcard certificates without switching to Vercel name servers. Please follow this guide: https://vercel.com/guides/wildcard-domain-without-vercel-nameservers
tl;dr; we started allowing the NS delegation method for the DNS-01 challenge.
https://letsencrypt.org/docs/challenge-types/#dns-01-challenge
…