Create subdomain api/code

software development

#1

Hi, I need to create at least 100 subdomain and I wonder if there is an automatic way to do that. I don’t want to host other people stuff so I don’t need to be accessible to other people. I need to do it just now for me.

Any idea if it’s possible or I have to file a ticket?

Thanks

Cupons:[color=#0000CC]MAO_HALFPRICE[/color] : pay only half of the price (L1 plans only) MAO97 get 97$ back


#2

You can file a ticket if you like, but there is no published API for doing what you propose. :frowning: .

There has been quite a bit of work done toward automating panel access by some users, however :wink:

–rlparker


#3

Pity.
I was thinking something similar to the code you are pointing to, but I feel like it’s not fair and I hoped for something fool proof
:slight_smile:

Cupons:[color=#0000CC]MAO_HALFPRICE[/color] : pay only half of the price (L1 plans only) MAO97 get 97$ back


#4

I understand completely. That code does have the “hard parts” worked out, and it does work (I’ve used it successfully in testing) so it is a good start toward something more “user friendly” and robust.

That said, without an “official” API, anything we build to facilitate this is instantly “borken” when/if DreamHost changes certain things and, I suspect, if such “under the radar” manipulation of the panel was to become widespread they most likely would make those kinds of changes. :wink:

–rlparker


#5

I’ve been thinking about this, and it seems to me that the best way to do it would be to first request a Wildcard DNS entry for your domain, and then use .htaccess or PHP to parse the HTTP_HOST value in the request and redirect to the relevant subfolder.

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#6

That sounds interesting, even if I haven’t really understood the possible technical problems. I need only web sites, so I don’t mind if ntp.xx.com is treated as me.xx.com. I need to be able to have web sites like: a.xx.com b.xx.com c.xx.com

I should probably ask DH about it.

Cupons:[color=#0000CC]MAO_HALFPRICE[/color] : pay only half of the price (L1 plans only) MAO97 get 97$ back


#7

The biggest problem with using a wildcard DNS entry is that the “subdomain” part needs to be unique, and shouldn’t clash with existing subdomains (like mail.example.com, webmail.example.com, etc.). Essentially, you write a script that redirects (or rewrites) *.example.com to example.com/*

si-blog
Max discount on any plan with promocode SCJESSEYTOTAL


#8

Ok so that shouldn’t be a problem. We need only to ask DH to remove the mail server from that domain. I think mail.example.com is the only one, right?
Wrong.
mail, ftp and webmail have to be removed.

Cupons:[color=#0000CC]MAO_HALFPRICE[/color] : pay only half of the price (L1 plans only) MAO97 get 97$ back