httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [users@httpd] Hosting Scenario
Date Thu, 10 Jul 2008 23:10:09 GMT
On 7/10/08, S. Ural <> wrote:
> There are 2 domains, and seeing the same document
> root and thus having the same content.
> I want both them get indexed in search engines as separate domains.
> 1-      Do I need to create these 2 domains under Apache separately?
> 2-      Or aliasing one to another can do the trick?
> 3-      Does aliasing  mean that only one is Ok to be defined in httpd.conf?
> (Pooling the 2nd in DNS will do it work?)
> Thank you

First, "domains" do not affect Apache httpd.  DNS and Apache httpd can
be completely separate.  DNS defines IP Addresses for server names
within a domain.  Possible server names include the no-name
(""), defined names ("" and
"") and the wildcard ("*") receiving
requests for undefined names.  The Internet sends requests for a named
server to the specified IP Address.  Then the server decides how to
respond.  (Research "ports" and "protocols" for information about
multiple software servers on the same hardware.)

The challenge has always been how to serve different content based on
the server names.  Apache httpd provides this functionality with
"virtual servers."

With no virtual servers, every request to Apache httpd server is
handled alike.  If DNS points multiple server names to the IP Address,
the same content will be served for each of the server names.

The same results happen with virtual servers if the domains are not
defined -- both use the default (first) virtual server and serve the
same content.

The same results happen if multiple server names are aliased in the
virtual server configuration.  The configuration is used for the
specified server names leading to the same content.

The same results happen with virtual servers if the domains use the
same content directory.  The process uses separate configuration
settings to reach the same content.

Unless different virtual servers are configured to use separate
content directories, the same content will be served.  (Rewrite rules
can also serve different content for different server names, but why
bother when virtual servers exist?)
Using multiple domains to boost hits is counter-productive.  Traffic
will be split amongst the multiple domains lowering the score for all
the domains.  Better choose a primary domain and use the extra domains
as shortcuts to specific information.  Example:
can permanently redirect to:
You can market the short URL while search engines push traffic to the
primary website.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message