Forum Moderators: buckworks & webwork

Message Too Old, No Replies

Dynamic Sub-Domains (Simple Question)

         

elushka2

11:50 pm on Mar 21, 2007 (gmt 0)

10+ Year Member



Hello, I am hoping that someone here could answer a question for me. I am a business person, and understand nothing about programming.

Is it possible to make a website with dynamic sub-domain names? For instance, can I make a separate website for lastname.pictures.com, and thus make a separate website for an unlimited amount of people in that format?

Let’s say my last name is smith. I am looking to create a website which would allow me to go to smith.pictures.com and get the proper customized content.

If, however, smith.pictures.com is not yet available, it would automatically and dynamically create this page, but by first asking the user some infomation. So, if smith.pictures.com is not available, a page will with some input data will appear, and then smith.pictues.com will be available automatically without any webmaster intervention.

Is this possible?

Is there a limit to how many sub-domains a server can handle, are there drawbacks? I understand one way of doing it is having smith.pictures.com forward automatically to picutres.com/smith. Would this be more efficient from a programming standpoint? If so, can it be masked as smith.pictues.com, which is needed for marketing?

Thank you so so much, to whoever answers this question! Your help is GREATLY appreciated!

Ilya

jtara

5:28 pm on Mar 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, this certainly can be done. Many sites that have user pages (for example, blogging sites) work this way.

You will to write software that will update both the DNS servers and the webserver configuration each time a new user is added.

No, there is no limit on the number of subdomains.

You may have a bit of a problem coming-up with a suitable, robust, DNS infrastructure. This might be one of those cases where it is best to supply your own DNS servers, (which will give you more control) but you will give-up some reliability.

You are required to have at least two DNS servers, and it is RECOMMENDED that they be in seperate physical locations.

Alternately, you could look for a third-party DNS provider that has an API. Some will charge you extra for a large number of records.

In any case, you are going to have to become pretty throughly familiar with DNS and with Apache (or whatever webserver you use) configuration.

Actually, I think you can probably "wildcard" the virtual server configuration so that any subdomain is served from that user's home directory, so you will only have to deal with updating the DNS servers and creating a home directory when a new user is created.

I understand one way of doing it is having smith.pictures.com forward automatically to picutres.com/smith. Would this be more efficient from a programming standpoint?

I can't think of any good reason to do this, unless you are stuck with shared hosting. I certainly wouldn't recommend that. You are going to need a VPS or dedicated server to do this right.

elushka2

3:57 pm on Mar 24, 2007 (gmt 0)

10+ Year Member



Thank you so much for your help! I greatly appreciate it!

ashii

9:32 am on Mar 25, 2007 (gmt 0)

10+ Year Member



You will to write software that will update both the DNS servers and the webserver configuration each time a new user is added.

Actually its much easier than above.Ask your host to allow Wildcard for subdomains.
This will allow any XYX.domain.com to get resolved.

after that you can check if user is valid and if not redirect to signup or 404 page.

However if you are on a shared server ,hosting may not allow you to do that.