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.

If I host my DNS at a hosting company, and use them for email, is it possible for me to actually run the website at another hosting company? i.e. they other hosting company does not provide access to DNS or an email server, so I just want to use them for windows/IIS and my other host for DNS and email.

could I just create a cname at host#1 pointing to host#2 ?

share|improve this question
add comment

4 Answers

up vote 6 down vote accepted

Yes you can do that. It doesn't matter who you host your DNS with, there are even free providers that will host it for you. At this point whether you need CNAME or A records is dependent on the server addresses the company gives you.

Lets assume your email host provides you a server with the IP of 20.20.20.20 and your webhost provides you with a website address of mysite.somehost.com and not a specific IP.

In your DNS settings you will configure

mail.yourdomain.com with an A record pointing to 20.20.20.20
yourdomain.com and www.yourdomain.com with a CNAME record pointing to mysite.somehost.com

More information: Canonical Name Record (CNAME) showing the usage of CNAME records as aliases for a single IP and for usage with external servers.

share|improve this answer
add comment

From Wikipedia:

A CNAME record or Canonical Name record is a type of resource record in the Domain Name System (DNS) that specifies that the domain name is an alias of another, canonical domain name. This helps when running multiple services (like an FTP and a webserver; each running on different ports) from a single IP address. Each service can then have its own entry in DNS (like ftp.example.com. and www.example.com.). Network administrators also use CNAMEs when running multiple HTTP servers on the same port, with different names, on the same physical host.

So I think the answer to your question is NO, as a cname record is used to use the same physical host to serve sites with different names. What you want (if I understand correctly) is using 2 different physical hosts to serve the same name (but different protocols).

share|improve this answer
1  
DV as I believe your answer is incorrect. –  Chris Marisic Dec 7 '09 at 13:20
add comment

DNS doesn't tie you to a particular provider.

Your email hosting company should be able to give you the DNS settings that you need to use their service, it shouldn't be a big deal. You may or may not need a CNAME.

share|improve this answer
add comment

Before we get into a flame war about cnames or a records & such, lets establish one thing first. Your DNS is hosted at a hosting company, they also provide you with email.

So this means that your MX record points to your hosting company's server.

If you get hosting for a website, then all you'll need to do is update the DNS with your hosting provider to point to the hosting providers server.

Think of a cname as an alias. it doesn't point to an IP, but another hostname.

share|improve this answer
add comment

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.