Forum Moderators: phranque

Message Too Old, No Replies

Efficiency of many virtual hosts vs. one host?

What's more efficent?

         

FormosaKing

12:24 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



I'm hosting many domains on the same server, and each domain has very similar content. The only differences are a few links on each page, and a picture.

Right now, I have my common files in one place and have a virtual host for each domain to contain the files that are unique.

I was thinking of using just one host, and using php to show content based on what domain a user requests. Or even just redirecting to a folder on the server based on the domain.

So would it be more efficient to:
1. Have many virtual hosts that share common files?
2. Use one host that redirects to different folders?
2. Use one host and PHP to determine what content to show?

I run web proxies, so my traffic is currently pretty resource intensive.

Thanks!

jdMorgan

2:39 pm on Jul 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do not "redirect to different folders" as this exposes your internal filestructure to clients in the URL. Instead, use script "includes" or "requires" to pull in the proper files and display them from within your script.

The rest of the answer is, "It depends on what you are most comfortable with, and how each approach affects your ability to easily administer the sites." Using PHP to get and echo the proper site contents is *slightly* less efficient, but likely not so resource-intensive as to outweigh the potential advantages in site maintenance.

The description of your sites does not sound good from a search-ranking perspective; It is likely that these sites will quickly be detected as near-duplicates, and that your search ranking results will be quite poor. If search ranking is important to your business model, I would suggest a re-assessment of your plans with that problem in mind. A search through our WebmasterWorld Google News forum for threads on the subject of "duplicate content" would likely be a good idea.

Jim