DNS provider for unlimited subdomains with api access?

I have a project that will offer users their own domain, like tumblr.

I want to find a supplier who can provide:

  • One top domain. for example: myproject.com
  • Unlimited subdomains. for example: a.myproject.com, b.myproject.com, ...
  • API for automatic creation of subdomains
  • Reasonably priced (if possible).
+3


source to share


1 answer


no need for the api to automatically create subdomains, this can be done using pure DNS on the server.

Select vendor first, my fav is http://mediatemple.net/webhosting/dv/ $ 50 / mo

(So ​​many vendors who choose from most of them allow unlimited subdomains, hot guitarist has one main domain with unlimited submarine $ 3.96 / mo http://www.hostgator.com/shared.shtml )

Next, in your DNS add an A record, for example:

*.myproject.com.

      



NOTE. All reserved entries like mail, cpanel, www, etc. will traverse the template.

Now all subdomains will be transferred to your website 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];

      

You now have a subdomain. in your application!

+5


source







All Articles