I have a project in mind that will offer users their own domain, like tumblr does for example.
I want to find a provider that can provide:
There is no generic way to create subdomains. You will need to call an API provided by your ISP or DNS provider -- typically SOAP or REST. Either that, or use a wildcard domain (*). On the IIS side, be sure to configure you application so that it doesn't use Host headers.
To delegate the entire subdomain to another DNS service, you need the following records in your hosts DNS: two Name Server ( NS ) records pointing to the authoritative name servers for your sub-domain. Address ( A ) records for the sub-domain name servers.
Yes, without a problem, this is one of the basic functions of DNS.
no need for an api to create subdomains automatically this can be done with pure DNS on the server.
First select a provider, my fav http://mediatemple.net/webhosting/dv/ $50/mo
(So many providers to choose from most all of them allow for unlimited subdomains, hostgator's hatchling has one primary domain with unlimited subs $3.96/mo http://www.hostgator.com/shared.shtml)
Next in your DNS add an A record like:
*.myproject.com.
NOTE: any reserved records like mail, cpanel, www, etc will over ride the wildcard.
Now all subdomains will be piped to your websites index file
then in your index.php (this example uses PHP)
$url = 'http://en.example.com';
$parsedUrl = parse_url($url);
$host = explode('.', $parsedUrl['host']);
$subdomain = $host[0];
Now you have your subdomain. in your application!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With