Reputation: 1351
Sorry for the completely newbie question, but I really do not seem to understand how this would be done.
Can you automate the creation of sub-domains for a multi-tenant application that is hosted? Say for example a new customer signs up and specifies the sub-domain of choice. user1.mysite.com.
How do I automate the creation of the sub-domain and have it point to the single instance of my application? If yes, how do you go about doing this? Any samples or links would be most appreciated.
Thank You
Upvotes: 2
Views: 2512
Reputation: 719
If you have owned the domain, you can create a subdomain manually in the configpage of your domain provider. The provider will have to config the subdomain for you(input subdomain and IP mapping into DNS Server). This could delay for some hours. After that, you can create another mapping between your documentroot(where you application lives) and subdomain with . see more details here.
Upvotes: -2
Reputation: 2741
You don't create subdomains, you create a wildcard DNS record.
*.mysite.com A 1.2.3.4
Upvotes: 9