Problem: Subdomains/Nameservers

Hello - I’ve been trying to set up wildcard based subdomains for 0xknowledge.io

We purchased the domain via namecheap, and in a previous round did our nameserver setup with cloudflare. Now, I’m able to add the domain and verify it within our vercel project, but Im not able to properly configure the wildcard subdomain here:

When I click configure DNS I get:
Screen Shot 2024-10-24 at 12.49.23 PM

After some time last weekend, I read about needing to change nameservers in our registrar (namecheap), and did this, replacing the cloudflare nameservers with the ns1/ns2 vercel nameservers. 96 hours passed and the change did not seem to propagate, and if it did, vercel did not recognize that we had switched.

What I am confused about is exactly the layout for how we are supposed to create wildcard based subdomains given:

  • If I try and create a subdomain with my registrar using cloudflare and the respective records in cloudflare, I’m unable to click “enable dns” to fully configure the domain
  • If I replace the nameservers, same issue, but I can’t even add the prerequisite base domain to vercel because I get this screen when trying to access my project dns records!

    (for this url: Login – Vercel)

We’re confused, frustrated, and would love some insight about how to get Vercel DNS working for a domain name created outside of vercel

Deployment URL or Custom Domain:
Environment (local, preview, production):
Project Framework:
Build Settings:
  Framework Preset:
  Build Command (if not default):
  Output Directory (if not default):
  Install Command (if not default):
Node/Runtime Version:
Package Manager:
Relevant Packages:

Unfortunately, DNS propagation can take a while and in this case, quite a long time.

I checked DNS propagation with DNS Checker and can see that the domain has fully propagated: DNS Check Propagation Tool: 0xknowledge.io, and performed a check on our end, and the domain 0xknowledge.io resolves to Vercel. Are you able to see the domain successfully resolve to your deployment?

I see… Well I regret having “cancelled” the propagation this morning then…

Now, I just a moment ago changed the DNS in my registrar again back to ns1/ns2 vercel, but at the time of your response I imagine that it was still pointing to cloudflare nameservers, which contained the necessary cname/a/txt records for 0xknowledge.io, app.0xknowledge.io, www, etc, all of which did work just a while ago.

Though the domain did resolve with this version, if I’m understanding correctly, the only way that we can do dynamic/programmatic creation of subdomains is if we use a wildcard subdomain type system ie *.0xknowledge.io, added into vercel.

let me know if I’m conceptualizing this incorrectly, but yeah as of now I’ve just reset the dns in namecheap back to ns1/ns2 vercel nameservers (ouch, 96 hours)

Also: generally am I following the exact right procedure for setting up wildcard subdomains? It’s difficult to find precise docs on this, and I’ve read a variety.

Currently this is what we have:

Which I imagine will resolve when the nameservers propagate, but lord help me if that takes more than 96 hours

My exact situation can be summarized in an image:

I configure my domain/subdomain, but once I’ve added my txt record in cloudflare for *.0xknowledge.io, I cannot enable vercel DNS because I get the above error. Extremely confused as to why this is happening.

Cheers, I’m happy to share more details about the cloudflare detail/setup as needed. As an overview, our registrar is namecheap, and we are using cloudflare nameservers, wherein I’ve registered the above records.

Solved: it’s working… So it seems that this record is needed, but there is no need to further configure using vercel dns?? This seems like either a bug on the vercel side or a failure of documentation.

Hey,

If you want to use wildcard domain such as *.0xknowledge.io, your domain must be pointed to Vercel Nameserver: Why must we use the Domain Nameservers method for Wildcard Domains on Vercel?. Only after pointing to Vercel NS, we can enable Vercel DNS and issue manage Wildcard domain from our server.

1 Like

Thank you! I have a few clarifying questions now:

Okay, so when I now try to navigate to (somesubdomain).0xknowledge.io it works, taking me to the original site because we dont have the middleware/subdomain routing set up yet. If I then try to navigate to that same site another time in another tab, I get a 404.

When you say my domain must be pointed to Vercel Nameserver, what do you mean?

That my registrar must switch nameservers?
That I need to add another record/set of records in cloudflare to point this domain to vercel nameservers?

Currently in cloudflare I have a txt record verifying *.0xknowledge.io, as well as a CNAME record for * pointing to cname.vercel-dns.com.

Please be specific, the guide you linked then shows a link to “here” regarding the nameserver method, but this is just the intro page, but is the actual “nameservers method” you are describing the changing of the nameserver in the registrar as detailed in this page?

Thank you. The last tie we tried to reset the registrar nameservers to vercel, it didn’t propagate even after 96 hours, but resetting to cloudflare took only 3. Could this have been because of record misconfiguration on our part of just because vercel nameservers take a long time to connect to?

Thank you so much!

For the wildcard domain to work, you would need to make the domain use Vercel nameservers instead of using a CNAME record. The nameservers method is needed so TLS certificates can be issued and renewed automatically. It’s possible to use wildcard domains without fully switching to Vercel Nameservers, but you would need to add NS records.

I think that this worked.

Though I can change my nameservers in namecheap, I went against this specific quote in the article you linked:

Please note: Using this method may prevent other hosting providers from creating certificates for their service and should only be used if you cannot change your name servers.

I went against this recommendation because the last time I changed to the vercel nameservers, even though they propagated (I think), the change then ignored the records set in cloudflare, leaving me to again verify that the domain (0xknowledge.io) was our domain by adding a text records, but I could not because I could not enable vercel DNS. In this case, I either did not need to first add 0xknowledge.io as a domain before adding the wildcard subdomain, and I am making the wrong decision in going for the NS records now, or I am making the right decision now because I was unable to even verify 0xK.io in the first place when attempting the nameserver change menthod.

Cheers and I hope this works!

Last thing:

Once the SSL certificate is generated, will I be able to enable vercel DNS as required by the second step in this method? If the SSL certificate fails to generate, what might my issue be?

Will you comment on the above information concerning SSL certificates? It has not yet been generated, roughly 3-4 hours have passed.

Thanks!

Please review the domain troubleshooting guide to get this solved for your specific situation :pray:

Final question: What do you mean domain must be pointed to vercel nameserver? Add vercel nameservers in registrar or add otehr records in cloudflare? which is it

Hi,

It means adding Nameserver to registrar where you domain’s NameServer is defined.

Gotcha, will do. What records will I need to alter in cloudflare once I set the nameservers? None?

You won’t need to setup anything in Cloudflare. Once you choose NameServer method, you need to set all existing DNS record in Vercel dashboard since the DNS will be managed by Vercel in future. Adding & Configuring a Custom Domain

Hello!

So, I’ve changed my nameservers in my registrar (Namecheap - my domain is 0xknowledge.io) to ns1/ns1 vercel:

I’m pretty confident the nameservers ahve propagated, as when I run “whois 0xknowledge.io” and “dig +trace 0xknowledge.io A” it traces to ns1/ns2 vercel.

That should be well and good (if it isn’t please let me know why, I request that you also take a look when running these commands as I am a novice at network configuration), but I still need to confirm that I own 0xknowledge.io:

(I also need to do this for *.0xknowledge.io, wildcard subdomains are the whole reason I switched my registrar nameservers)

However, given that I’ve switched my nameservers to vercel (previously cloudflare) I cannot add any txt records, and I cannot access the DNS records interface.

Please help me understand what I need to do to confirm ownership of my domain in vercel so that I can begin adding DNS records under it.

Thank you!

Hi there

  1. You need to confirm ownership to transfer the domain to Vercel account.
  2. Once confirm, you can point the Nameserver to Vercel NS and manage DNS record.
  3. You should be able to configure *.0xknowledge.io after that.

please elaborate on step 1.

I think my post explains why I do not understand why and how this is possible.

Where am I supposed to “confirm ownership”? If I reset my nameservers to Cloudflare, then add this txt record to confirm ownership, then switch my nameservers, won’t I still have the exact same issue of needing to confirm ownership once my nameservers no longer point to cloudflar which had that txt record?

What am I missing here

After you verify domain access, you’ll be able to configure the domain either way. The TXT record should no longer be needed after domain access is verified.

Alternatively, you could set NS records to use a wildcard domain. Note that this is a more advanced configuration and not recommended for most cases.

I don’t understand, the txt record is the method we use to verify domain access, but the record will no longer be needed once verified? This seems contradictory. Are you implying that after I verify, I need to then transfer my domain to vercel? Please be more specific.