0

Hopefully a very simple question ...

With a Linux server how can I get 3 different domains to all point at the same server and show exactly the same application, but with the different domains still showing in the browser address bar?

Is it just a case of setting the DNS for each domain the same or would the server require some configuration too?

0

3 Answers 3

1

Assuming this is an Apache web server, you would need to point all of the domains to this server, and then configure Apache to serve the site site to these three domains. Check out the docs here: http://httpd.apache.org/docs/current/mod/core.html#serveralias. It depends on how your server is configured, but you most likely just need to add the different domains as multiple aliases.

3
  • sorry for the delay in response. the domains are all pointing at the server but it's shared so i don't have access to the server's http.conf file for setting up a new vhost. apparently i can do this with an .htaccess file but i'm not sure how to go about that? Jun 8, 2011 at 16:09
  • so in summary, each of the 3 domains needs to point to the same application folder on the server where i will use $_SERVER['HTTP_HOST'] to determine the domain and change the site config appropriately (unless there's a better way?) Jun 8, 2011 at 16:10
  • Are you given a specific folder on this server to put your application? If so, you might just need to point the domains there then. You won't know for sure if you don't have access to apache, but you can just try it in DNS alone, and it will likely work as you expect.
    – Paul Kroon
    Jun 8, 2011 at 17:16
0

Assuming you have a simple web server set up: Set the "A Record" for each of the domains to point to the same ip address. This would be done from your domain provider's (e.g. godaddy's) control panel.

0

Nope - it's all done in the DNS server: See http://technet.microsoft.com/en-us/library/bb727018.aspx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .