Settings

Theme

Ask HN: What domain provider do you recommend for unlimited sub-domains?

3 points by tim_nuwin 11 years ago · 6 comments · 1 min read


I currently use namecheap, but they have a limit of 50 or so subdomains.. I'm looking for a domain provider with an API that I can tie in w/ generating the sub-domain so when a company signs up for my service, they'll get a url like.. (http://customcompany.taskfort.com)

med00d 11 years ago

You're looking for a DNS host. Amazon's route 53 is a good choice.

Alternatively, you could use wildcard DNS and programmatically determine the host header value to direct the user to the correct place. For example, in PHP that information would be available by using $_SERVER['HTTP_HOST'].

  • mod 11 years ago

    The latter is what you want here, most likely.

    • tim_nuwinOP 11 years ago

      Ah yes, this is exactly what I needed. I did not know that you could do that until today. Thanks! Do you know if it's possible to exclude domains part of the wildcard in nginx (e.g. blog.mysite.com or forum.mysite.com):

      http://kbeezie.com/wildcard-subdomains-php/

      • Someone1234 11 years ago

        Do you mean via DNS or via PHP/HTTP?

        With DNS the wildcard is treated last. So if you define forums.* and blog.* to point to a specific server or CNAME, when those are requested that is the result which will be returned. Everything that has not been handled expressly will then hit the wildcard and be resolved as defined (explicit before implicit).

        With the HTTP server you'd just define rules ahead of the wildcard. For example, forums.* and blog.* would be handled first and anything which hasn't been handled at all is defaulted to whatever your wildcard handling-site is.

        This is pretty easy to do in at least Apache and IIS (just have your wildcard site as the default, and then define the hostname of everything else). The PHP code just reads in whatever is in the request header and handles it logically internally.

        PS - I like Route53 but it is expensive. Also set up billing alerts(!).

sideproject 11 years ago

Our company (http://www.postatic.com) provides a tool to create online communities.

When a user creates a community, they automatically get a sub-domain.

We do this by wildcard sub-domain.

Then you pick it up in the Apache conf file.

If you are using Laravel, it provides a wildcard subdomain routing feature

http://laravel.com/docs/4.2/routing#sub-domain-routing

It works really really well.

We also allow users to point their custom-domain name to the sub-domain they have been given (http://www.mydomain.com -> http://sub.postatic.com)

All works well.

We use 1and1 for our main domain (postatic.com) and our DNS is handled by Linode.

Let me know if you have any further questions. Will gladly share knowledge! (hello@postatic.com)

benologist 11 years ago

http://en.wikipedia.org/wiki/Wildcard_DNS_record

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection