0

I'm building an Azure Marketplace template that will build isolated tenancy (by definition) for a web app, but create a custom domain name based on the purchasing company (e.g.: 'acme') as a sub-domain to my product's apex domain (e.g.: 'product.com'). The specific website for the customer would then be 'acme.product.com'.

The company can specify what they want the sub-domain element to be, but I would like to verify that it is not taken before starting the ARM template deployment. That is, I would like verification to happen as part of the Azure Marketplace experience, rather than come back as a 'subdomain already exists' error.

Has anyone done this, or can explain how to do it please?

artless noise
  • 21,212
  • 6
  • 68
  • 105
Aiden Dipple
  • 134
  • 2
  • 15
  • Can you provide the code what you have tried so far? @Aiden Dipple – Jahnavi Aug 28 '23 at 06:32
  • Hi Jahnavi, sorry no ... I can't find anything on Google or StackOverflow that even describes how to start with that type of validation. I will if I find something. – Aiden Dipple Aug 28 '23 at 18:39
  • You want me to provide a sample template for your requirement? @Aiden Dipple – Jahnavi Aug 29 '23 at 04:26
  • 1
    That would be perfect please. – Aiden Dipple Aug 29 '23 at 05:24
  • After a workaround on this, I found a way to utilize Azure DNS alias records to prevent dangling references by linking a DNS record's lifecycle to an Azure resource. Refer [MSDoc](https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/security/fundamentals/subdomain-takeover.md). @Aiden Dipple – Jahnavi Aug 29 '23 at 09:53

0 Answers0