Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Practice: Setting Up Multiple Domains

Status
Not open for further replies.

mickeyj2

Programmer
Jun 7, 2007
79
US
Hi,

I need to setup (7) websites. They all look alike, but one will be my "main" website with my company's branding, and the others will be "sub-domain" sites that drill down further into my various product lines. For example,


Website 1 - abcbakery.com
Website 2 - donuts.abcbakery.com
Website 3 - cakes.abcbakery.com
Website 4 - bread.abcbakery.com
Website 5 - deli.abcbakery.com
Website 6 - coffee.abcbakery.com
Website 7 - weddings.abcbakery.com



Each of my sites will have their OWN IP ADDRESS.

Is it a logical best practice to do the following directory structures if I'm hosting all of my sites on one machine?

C:\inetpub\ (where my virtual website abcbakery.com points to)
C:\inetpub\ (virtual website is donuts.abcbakery.com )
C:\inetpub\ (virtual website is cakes.abcbakery.com )
C:\inetpub\ (virtual website is bread.abcbakery.com )
C:\inetpub\ (virtual website is deli.abcbakery.com )
C:\inetpub\ (virtual website is coffee.abcbakery.com )
C:\inetpub\ (virtual website is weddings.abcbakery.com )

Then in IIS, I'll just setup each of my individual websites to point to their respective directories?

Is this cool or not? What would you do? What are the advantages and disadvantages?

Thanks in advance for any help you can provide.

mickeyj2
 
Hey, has anyone done this before? One additional question. Is it cool to assign different IP addresses to each individual subfolder (i.e., website).

Any help you can provide is appreciated.

Thanks,
mickeyj2
 
Yes, the way you have it layed out is fine. You can assign different IPs to each website or use one IP for all web-sites, it's up to you. If this is a public web server I would suggest using one IP per-server and using host headers, this way you are not wasting public IP addresses.

Jesse Hamrick
 
Thanks for the feedback, I really appreciate it.

Hey, one more question. What is your take on having folders out on C:\inetpub\ that's shared by all of the sub-domains.

Is this possible?

For example, I'd like to have my stylesheets and Javascript in:
c:\inetpub\ and
c:\inetpub\
Would my sub-domains be able to access these directories? Is this a good idea?

Thanks in advance for any help you can provide.

mickeyj2
 
I have a tendency to create a separate partition (D:Drive) and move the folder and re-point the web-sites to the new directory structure. Why? if someone were able to hack into the file system and move above the dir, they would not be at the root of C: and would not be able to access the system files.

Jesse Hamrick
 
I agree with Jesse on moving the folder to a drive other than your system drive.

As far as setting up "shared" css and javascript directories, you can do this easily with Virtual Directories within IIS.

1. Create the CSS and Javascript directories.
2. In IIS Admin; right-click on one of your sites, select New -> Virtual Directory.
3. Use the name of the directory (CSS or Javascript) as the alias.

That should do it. If you want to read more about Virtual Directories check out
-Joe
 
You can assign different IPs to each website or use one IP for all web-sites, it's up to you. If this is a public web server I would suggest using one IP per-server and using host headers, this way you are not wasting public IP addresses.

I agree... especially since they're all pointing to the same server. You'll have less routing issues and save on public IP's.

In fact, using host headers, you wouldn't even have to register the multiple sub-domains.... anything going to abcbakery.com would point to your IP... then by reading the host headers, you can decide what the first part was... so weddings.abcbakery.com would still work, but if someone typed in wedings.abcbakery.com, you could have a custom error page come up for the mis-typed URL, as opposed to having a DNS error come up for not finding that *specific* site.



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top