DEV Community

Olumide Akinremi
Olumide Akinremi

Posted on • Updated on

Implementing Wildcard Subdomain (Part 1)

When building a multi-tenant application like slack, most times, there is always a requirement for all tenants to have their subdomain, e.g olumide.slack.com.

This article explains how to do that with zero cost on Netlify. Based on a Netlify support response, this feature is accessible on the Netlify pro plan, which cost about $19/month/user as of the time of writing this article.

Netlify Pricing

I will show you an alternative approach to doing that without using a Pro account. Thereby; saving you about $230 per annum.

  1. Get a domain, and use "let's encrypt" for a wildcard SSL certificate.

  2. Point your DNS to your Netlify app. it might take a while to propagate. You should see a tag with “Netlify DNS” on that domain when done.
    DNS

  3. Create a new CNAME wildcard DNS record from the Netlify “DNS Panel” if none is created automatically after step 2.
    New-CNAME

  4. From your netlify dashboard, go to domain management, and then select “Add domain alias” to manually add a new domain alias.
    Alias

You should be able to access your new subdomain immediately it’s saved on Netlify.

Watch out for Part2 if you are interested in learning how to create subdomains on the fly, without doing it manually.

Top comments (5)

Collapse
 
rolandodev profile image
Rolando

Hi, I need part two please...

Collapse
 
akinmyde profile image
Olumide Akinremi

Here is the link to the part 2 dev.to/akinmyde/implementing-wildc...

Collapse
 
akinmyde profile image
Olumide Akinremi

Good. I think you are the first person intreseted in the Part 2.
I should get it published in a week on 2.

Collapse
 
kevflynn profile image
Kevin

Part 2 vote from me too! Is it possible to do with just *.domain.com?

Thread Thread
 
akinmyde profile image
Olumide Akinremi

Yeah! the part 2 explained that dev.to/akinmyde/implementing-wildc...