Is there any way to write a script or something that will automatically create a subdomain? If not, is this a feature with a dedicated server? Also with a dedicated server would the time it takes to set one up faster then shared hosting?


Could you explain what you are trying to accomplish by this? And what event would trigger the subdomain to be automatic? You can create as many subdomains as you want/need in your Control Panel so I don’t really know why you would need to create them on the fly (unless you are trying to make one of those pages that dynamically generates a story or something). If so you’d probably want to just set a catch-all for the subdomains and have a php script pick up subdomain info. I’m still not totally sure what you mean by automatic though.


Well I am trying to set up a small phpbb forum hosting service. Right now I don’t really want to move to a dedicated hosting unless I really need to do it. I will later if I can generate enough money by doing this. So automatically would refer to setting up one without me have to do it mainly


There would be no difference in shared and dedicated hosting in this regard, but I don’t really understand why you don’t want to click a few buttons. All you have to do within your control panel is click “Domains”, “Manage Domains” then under fully hosted created your new subdomain. That’s all you need to do. You can get fancy and assign it to a new user or change the other settings but all you need to do is under the new subdomain you want and pick a foldername for it, then you are done.


Your idea sounds cool, but the chances are pretty slim. I think it’s to help DH protect itself from runaway malicious scripts. I wanted to do something ever simpler, by letting users create their own email accounts dynamically. There isn’t even a method to do that. Support basically said that if you can create a form post, that emulates the Add Email form in the web panel, they wouldn’t stop it. Same rules most likely apply, but you might check in to avoid any problems with the TOS.

BC Tech
Team Shocker


That’s interesting pangea, I guess they don’t want to act as a mailserver for the general public. As far as billybob is concerned though, based on what he said it sounds like he just needs to create one subdomain, so a automated proccess for that would be overkill =p. I do think you could come up with a dynamic subdomain handler though, but that would require that Dreamhost allows a subdomain catchall and AFIAK they are against that.


I think that some of your condescension dripped onto my keyboard, tonyrayo. Email accounts for the general public aren’t quite the same as creating email accounts on my hosted domain, for registered users of my site, through a server-side application page, that authenticates credentials according to my specifications. This activity could also be staged to occur, along with any other predefined actions, pending approval of the accounts by moderators of my site.

Please don’t make the assumption that you’re the only person in these forums with technical savvy. Additionally, it seems unlikely that anyone would ask for the capability to create subdomains programatically, if one subdomain was the ultimate goal in mind.

BC Tech
Team Shocker


pangea it seems like you think I was attacking you somehow? I wasn’t being concending or sarcastic, I didn’t know Dreamhost’s policy on handing out e-mail addresses so I found what you said interesting. I just use the phrase general public to represent someone that wouldn’t be working with other shell/ftp services.

I didn’t think I said anything that put anyone else down or would make you think that I regard myself as better than anyone else. I can only go based on what someone and said, and billybob has said he needs a subdomain for his forum. I didn’t know if he thought there was more involved in creating a subdomain then there is, that’s why I explained what needs to be done currently and tried to make an observation about what could be done in terms of creating dynamic subdomains. Sorry for any confusion.

Edit: I went through and re-read billybob’s post, and it seems like he wants to create a service for hosting phpbb’s not just his own, this is probably where the confusion came in. This is probably something that I have to assume DreamHost wouldn’t like you doing on a shared host (probably for sql hits more than anything else). AFIAK they handle domains the same on both services, but I’m sure you could get creative with an apache mod or a shell script that would automate the proccess for you. Sorry again for misreading.


Fair enough. I took your post the wrong way. My apologies.

BC Tech
Team Shocker


Yea I had a felling that they wouldn’t like it either. That is why I want to keep it small just a few forums that I set manually. I am just asking this because I want to make sure I can do this then I have enough money to get a dedicated server. Right now I just want to see if my ideas are possible and how to go about doing it. And since a dedicated server is a lot more money then basic sharing, I want to have it up and going as soon as possible. Therefore I need to have the scripts almost done before I get a dedicated service.


Keep in mind that creating the subdomain is just a small portion of the process, billybob. Presumeably you’ll also be wanting to create seperate user accounts for each subdomain if you’re going to let the clients have their own forums. Most likely this will carry over into needing email addresses for their admins, creating the necessary databases and MySQL user accounts, and deploying the phpBB system.

It’s a pretty complex task, and the subdomain creation seems like one of the more simple aspects of it. Definitely keep dreaming big, but that’s going to take a good amount of engineering to pull off.

BC Tech
Team Shocker