How to setup whitelabel for your azure website?

549 views Asked by At

I have seen quite a lot of websites like agoda, booking.com etc. offering whitelabel services for their affiliate programs. It would have you set the cname record of your website to point to their domain like whitelabel.agoda.com (example). I am not sure how this is done as I am trying to do it but i keep getting a 404 error.

Here is what I have tried so far :

I have a website called example.com and I am using azure for hosting my web application. I am planning on having an affiliate program that the other users can add their own cname to my whitelabel.example.com and it will just go to my website of example.com (and I will just do my own logic using c# from there).

The question is :

How would I go and setup for it ? right now I have a cname linking whitelabel.example.com to example.com (This works). However when testing from another domain, adding cname record let's say of hello.example2.com to whitelabel.example.com, it just gives me a 404 azure page.

Please advise. I am very sorry that I am very bad this.

2

There are 2 answers

0
Nancy On

Not sure if I am understanding your requirements correctly. It seems that you could map a wildcard domain (for example, *.contoso.com) by using a CNAME record to your web application(if it's hosting on Azure App Service).

Then, you can now add any subdomain that matches the wildcard name to the app (for example, sub1.contoso.com, sub2.contoso.com and *.contoso.com both match *.contoso.com) to the custom domains of the app service. You will access your application via different URLs like sub1.contoso.com or sub2.contoso.com.

Reference: https://learn.microsoft.com/en-us/Azure/app-service/app-service-web-tutorial-custom-domain#map-a-wildcard-domain

0
Hammer On

Yes, except that *.contoso.com doesn't work. It cannot be used as a custom domain. All other subdomains work, but not the wildcard one.