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.

How do i redirect domain to a different server IP?

Discussion in 'Bind / DNS / Nameserver Issues' started by postcd, Nov 25, 2016.

Tags:
  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    Hello,

    hello, domain domain.com is hosted on cpanel server 1

    i want to move cpanel account for this domain to a cpanel server 2

    Can i edit DNS zone of domain.com at server 1 to point all request for domain.com to a cpanel server 2 IP?

    So the domain.com nameservers will point to the server 1, and server 1 will redirect all requests to the server 2

    Can it work this way, can anyone please post steps needed to make this working?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,186
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This will work, but you would have to manually edit the DNS zone on the first server to match the entry in the DNS zone on the second cPanel server. Have you considered setting up a DNS cluster instead?

    Thank you.
     
  3. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    653
    Likes Received:
    11
    Trophy Points:
    68
    I just need to replace old IP by new IP in the old server's DNS zone for that domain?
    DNS cluster might be also the solution maybe.
    PS: redirection on the lower level, like iptables/ipset will not work?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,186
    Likes Received:
    1,295
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, if the DNS for the domain name is handled on the source server, you'd have to make any changes to the DNS there.

    Redirection via IPTables isn't recommended in this scenario, as a simple DNS modification would correct the issue. Or, you could simply update the name server IP addresses at the registrar to point to the new server IP addresses.

    Thank you.
     
Loading...

Share This Page