views:

882

answers:

2

I have the following task: Create one website which is accessible with 20 different domains names.

Same files, same folder, same ip.

Question (shared hosting): Can this be accomplish with a bare cname's pointing to the same common subdomain or do we need one static ip for all?

The problem is sure shared hosting and I'm trying to avoid creating manually "cpanel addon domains" one by one. Shared hosting doesn't allow to modify httpd conf which allows me to create a wildcard virtual host for an IP.

I guess my question is auto answered; I'll need a static unless I'm only using subdomain's w wildcard, which works on shared hosting. "*.domain.com", "two.domain.com", "three.domain.com" => directory/

+3  A: 

I think you have answered your own question, the options open to you are

  • Add ServerAlias entries to the vhost config, via whatever means available to you
  • Ensure the default virtual host on the target IP is the one which handles your site
Paul Dixon
+2  A: 
  1. If you use a CNAME (or indeed an A record pointing to the same IP address) then you must, as Paul says, either have ServerAlias entries in httpd.conf, or point them at the default virtual host

  2. If you can't do that, host 19 of the domain names at some other web host, and then use HTTP redirect to get users to the "preferred" domain name. However if you do this then the domain name will change in the user's address bar.

Alnitak