Implementing Wildcard Subdomain (Part 1)

akinmyde

Olumide Akinremi

Posted on August 8, 2021

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.

💖 💪 🙅 🚩
akinmyde
Olumide Akinremi

Posted on August 8, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related