The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Host a website for a domain hosted somewhere else?

Discussion in 'General Discussion' started by atodea, Apr 23, 2011.

  1. atodea

    atodea Member

    Joined:
    Apr 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Is it possible to host a website for a domain hosted somewhere else?

    Server A: New server with cPanel that shoud host the website without adding the domain.
    Server B: A different server which already hosts the domain (DNS, Email, etc.)

    I want to move just the website from Server B to Server A leaving the other services on Server B.
    I know that on Server B I have to redirect www to the IP of Server A.
    I want to learn what am I supposed to do on Server A and if it's possible to that from Server A's cPanel.

    Thank you!
     
  2. JayFromEpic

    JayFromEpic Well-Known Member

    Joined:
    Apr 2, 2011
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Scottsdale, AZ
    cPanel Access Level:
    Root Administrator
    What your looking at doing is basically off server email hosting. It is actually fairly easy. Depending on your domain registrar, it is usually a 5 minute setup.

    What you need to do is just set your name servers like they normally are, ns* and ns*. But when you go and make the website account, you will see option at the bottom for mail configuration, your gonna wanna choose the one that suites you and you will then need to change the mx records. Thats about it.
     
  3. atodea

    atodea Member

    Joined:
    Apr 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks but this is not what I meant.
    I want to host the website on a new cPanel server while leaving DNS, MX on a different server.
    I just want to move the website on my new cPanel without affecting anything else that is already working on the other server.
    I know what I have to do on the other server (Server B).
    What I want to know is how can I setup my website on cPanel without adding DNS records for that domain.
     
  4. BMR777

    BMR777 Member

    Joined:
    Nov 26, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I suppose that on server b you could edit the DNS so that the A record for the domain points to server a's primary IP. Then on server a, create a new account with the domain name of the site you want to host, and change the DNS for everything except the A record back to the other server.

    Not sure if it will work, but I always wondered if something like this would work. You still have to add the domain to server a, however you're still having the DNS for the domain set to server b. :)
     
  5. atodea

    atodea Member

    Joined:
    Apr 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, this is almost perfect.
    Sometines however I don't know the Settings on Server B
    A client may want to host his (only the) website with me but I'm not in control of his DNS to know it's settings.
    Isn't there any way to host a website on cPanel without adding DNS settings?
     
  6. BMR777

    BMR777 Member

    Joined:
    Nov 26, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    As long as the client sets their domain's nameservers to those of Server B this scenario will work fine.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    This is going to be an issue if the MX entry is domain.com for the domain. If you change the A record for the domain to point to server a, then the MX record must instead be mail.domain.com and mail.domain.com cannot be a CNAME for domain.com (it has to be an A record for mail.domain.com to point to server b). This means you'd have the following on server b for the DNS records on that machine:

    domain.com. 14400 IN A server_a_IP#
    domain.com. 14400 IN MX 0 mail.domain.com.
    mail.domain.com 14400 IN A server_b_IP#

    This is the only way what you are describing will properly work. Otherwise, you'll end up having the mail begin routing to server a due to using domain.com for the MX entry and domain.com would be pointing to server a's IP#

    Under the above setup, server a will need to ensure to have the domain in /etc/remotedomains file and not listed in /etc/localdomains file.
     
  8. atodea

    atodea Member

    Joined:
    Apr 23, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thank you.

    It was easier than I thought.

    Server A:
    1. Create account.
    2. Delete DNS zone.

    Server B:
    Edit DNS, update "www" to Server A IP.

    It works and I guess it's also very clean.
     
  9. _NANO_

    _NANO_ Registered

    Joined:
    Nov 18, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Temuco, Chile, Chile
    cPanel Access Level:
    Reseller Owner
    Hi, I just tried this but when I try to delete the dns zone for domain.com in server A, I get this message in WHM:

    any help?
     
  10. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    This error simply suggests that you can not remove only dns zone of the domain without removing that domain fro the server.

    cPanelTristan has given best solution to meet the requirements of atodea. I think that should be followed :)
     
  11. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I'm uncertain why you would need to delete the DNS zone on server A. It doesn't matter if the zone exists on that machine. Simply revise the zone for the MX entries to point to another location on server A or put the domain into /etc/remotedomains to ensure all mail routes off the server. Any other records aren't going to be used anyway because only the A record IP for the domain itself is pointing to the machine and you don't control the DNS on server A for that domain anyway.
     
Loading...

Share This Page