Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DNS provider for unlimited subdomains with api access?

Tags:

dns

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:

  • One top domain. eg: myproject.com
  • Unlimited subdomains. eg: a.myproject.com, b.myproject.com, ...
  • An API to create subdomains automatically
  • At a reasonable price (if possible).
like image 485
eliocs Avatar asked Mar 19 '12 22:03

eliocs


People also ask

How do I create a subdomain in programmatically?

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.

What DNS records do I need for a subdomain?

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.

Can a subdomain have its own DNS?

Yes, without a problem, this is one of the basic functions of DNS.


Video Answer


1 Answers

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!

like image 199
Tim Wickstrom Avatar answered Oct 14 '22 08:10

Tim Wickstrom