Wildcard subdomains that dynamically point to specific resources on my site

Hi Guys,

Site is at: suspicious-babbage-5fa6bd.netlify.app

Also have DNS managed by netlify.

For the purpose of what I’m looking for, imagine my users each have a username and I’d like them to be able to go to username.nftr.name and have my ReactJS app redirect to a specific resource, for example nftr.name/username taking in the subdomain as a wildcard. How is this achievable?

Thanks,
Adam

If I had a way of telling netlify DNS to send all *.nftr.name traffic to nftr.name but leave the subdomain wildcard in, I could then just parse the subdomain part and redirect to the resource myself.

Hi @greatrat00,

Wildcard subdomains can be activated, but there are a few requirements:

  1. The site must be on a Pro or above team.

  2. The DNS must be managed by Netlify OR you need to bring a custom wildcard SSL certificate.

  3. The site should not have any domain aliases or branch subdomains.

  4. The primary domain of the website should be on the same level as the required wildcard domain. For example:

If you need the wildcard to be *.bar.domain.com where * can be your wildcard subdomain, the primary domain must be www.bar.domain.com (www can be replaced with any string).

  1. You need to configure the DNS for the wildcard subdomain even in case you are using Netlify DNS. You can follow the external DNS configuration for subdomains and add a CNAME entry with * as the hostname or any other value that you want. The value of this DNS entry should be the Netlify site address.

If that sounds like something that would work, please let us know and we’d enable it for your site.

Hi, thanks for your reply. Yes, please activate it and let me know when it is so I can start testing.

Thx

Once you have it active, we’ll take away the two branch subdomains we have and then create the wildcard CNAME.

Do you know if our branch deploys will still hold at the addresses in this format:

?

Thx,
Adam

Wildcard support has been enabled.

To continue using the branch deploy feature, we’d recommend creating a separate site for the mentioned branches and it would work fine there.