Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hi have some domains with one provider and the hosting service with other provider. In the hosting service I have one folder for each domain to host webpages.

Can I configure DNS entries (in one side) and .htaccess file (in other side) to have a multi-domain hosting? And if is possible what you recommend me?

Thanks in advance! Osar.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

With apache as your web sever this is done via name-based virtual hosts . The client sends the hostname in each request, and that is used by the server to determine which website to use.

Thus if you can configure your dns provider to point multiple dns names at the IP address of your hosting provider, you can then configure your hosting provider to present different websites to different clients, based on which dns name they request. That entails editing your httpd.conf and adding multiple VirtualHost entries. If a process like this is possible with your hosting provider, you can then support multiple different websites.

Note however this can't be done in the httpd.conf, not in a .htaccess file. Thus you have to ask your provider to do it for you.

share|improve this answer
    
I will try it. Thanks a lot! –  ocell Jan 18 '11 at 10:36

Typically most hosting accounts these days support "multiple" domains. You should be able to go into your hosting control panel and make a new site for each domain you have. Then go into your domain provider and wire up the DNS servers with your hosting provider's DNS servers.

Else, you might consider a different hosting provider. There are tons to choose from.

share|improve this answer
    
You are right but for the moment is not possible. Thanks! –  ocell Jan 18 '11 at 10:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.