Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Forward domain to another server

Discussion in 'Bind / DNS / Nameserver Issues' started by adamjedgar, Mar 23, 2017.

Tags:
  1. adamjedgar

    adamjedgar Registered

    Joined:
    Mar 23, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sydney
    cPanel Access Level:
    Reseller Owner
    hi guys,
    i hope i explain this correctly.

    I have an existing domain <mydomain.com.au> which is pointing at my reseller cpanel webhosting account using an A record at the registrar(ip <123.45.67.9>)

    Can i now point this domain to a new webhosting server on a new ip adress from within my reseller cpanel zone file records area?

    IE...From within the existing cpanel webhosting, i want to now point that same domain name at a wordpress multisite subdomain installation on google cloud.

    Please note, i have other subdomains on this same google cloud Wordpress Multisite installation that a being pointed at it directly from their respective registrars using an A record, and i have also tried this method with this topics <mydomain.com.au> and it works no problem.

    however, What i am trying to achieve is to be able to do this from a webhosting cpanel account rather than from registrar.

    I went into my reseller Webhosting Cpanel and added the following...

    <mydomain.com.au> = A record <google cloud Instance External IP address>

    using the domain mapping plugin on my Google Cloud WordPress Multisite, i have mapped Site ID = “<the actual site id number>”
    Domain = <mydomain.com.au>

    however when i navigate to the wordpress installation in a web browser, the website keeps reverting back to the original webhosting server.

    A dns trace also keeps showing the old hosting server ip address.

    How may i point an existing domain at a new wordpress multisite subdomain on a different server (with the same domain name) using cpanel?

    I must also advise…the wordpress installation is irrelevant as i am not taking the same wordpress website over to the new hosting service…its simply pointing the domain name only.
    I do not want to do this from the registrar end, i already know how to do it that way…it must be achieved from the existing webhosting cpanel.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    If the DNS for this domain name is handled at it's domain registrar, that's where you'd need to update the "A" record. Otherwise, if you want to control the DNS from the cPanel server, you'd have to setup name servers on the cPanel server and configure the domain name to use those name servers at it's registrar:

    How to Set Up Nameservers in a cPanel Environment - cPanel Knowledge Base - cPanel Documentation

    Thank you.
     
  3. adamjedgar

    adamjedgar Registered

    Joined:
    Mar 23, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sydney
    cPanel Access Level:
    Reseller Owner
    Gday michael,

    Thank you for your reply.

    When i browse the website using my mobile phone, it points to the google cloud wordpress installation. I waseven able to log into wordpress dashboard and install a new theme.

    What is enabling me to do this through my android mobile phone, but not through any other of my devices? (Eg no access via tablet, desktop pc which point at original cpnael hostjng account)

    Is there any workaround for people who dont have access to registrar dns but do have access to hosting?

    Does it make any difference whether its an A record or ns records being used at registrar to point at web hosting server? (In this case its an A record)

    I can redirct to another domain name or subdomain from hosting...could this be used as a workaround with a bit of trickery so that a users browser still displays domain name and not redirect url?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    One alternative is to modify the hosts file on your local computer using the instructions at:

    [Tutorial] Editing your local hosts file to preview sites

    However, you'd have to do this on any computer you want to access the website. Regarding the android phone, it's possible the DNS cache on your phone points to a different IP address. Is there any reason you do not have access to your domain registrar? Are you able to send them a request to change the "A" record? This is likely the best solution, as you won't be able to change the DNS on the cPanel server if the domain name's DNS is handled externally.

    Thank you.
     
  5. adamjedgar

    adamjedgar Registered

    Joined:
    Mar 23, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sydney
    cPanel Access Level:
    Reseller Owner
    Hi Michael,
    I dont have access to the registrar because i am a website dveloper and webhosting reseller for 3 particular websites where i have this need. The domain registrar is controlled by a third party.

    My reason for wanting to forward a users web browser to another ip address is so i can move all of the website files to another server without having to rely on the domain controller to change his A records at his registrar.

    I currently have an external server instance on Google Cloud that i wish to move all website files onto. This instance is a Wordpress Multisite Network and the websites in question are Wordpress ones. It is much easier and a lot fast for me to manage the individual websites Wordpress updates if i can access all websites from a single Wordpress Network Admin Dashboard (which there are some premium ones that I cannot automate through cpanel)

    My understanding is that inside cpanel, i can perform a domain redirect to a subdomain of my Wordpress multisite network , however this would change the URL shown in the users browser to a subdomain of my own would it not? (i would need to alter what then displays in the browser)

    Could i then apply a mask to change the displayed URL back to the original domain (or perhaps a slight modification of it so that for the average user it basically appears as if they are in the same place)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    That's correct, a redirect will change the address that appears in the address bar. Changing the domain name as it appears in the web browser address bar without having access to modify the DNS for the domain name is unsupported.

    Thank you.
     
  7. adamjedgar

    adamjedgar Registered

    Joined:
    Mar 23, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    sydney
    cPanel Access Level:
    Reseller Owner
    Thank you michael,
    may i ask why a domain redirect to a subdomain works, however an ip redirect will not?

    When i use the term ip redirect...am I really referring to IP rerouting? Are they the same thing?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You could redirect to a specific IP address using a Mod_Rewrite rule in the .htaccess file, however this would lead to the IP address appearing in the address bar, and it would require a dedicated IP address assigned to the account to ensure the IP address loads the content of a specific website. IP rerouting is typically something that's handled at the firewall level, like in the following third-party URL:

    How to reroute traffic form one IP to another while keeping the IP?

    However, I don't believe either of these options would achieve what you are seeking. Setting up your own custom name servers and assigning those name servers to the domain name is the best approach if it were possible, as this would allow you to control the DNS for the domain name via it's DNS zone on the cPanel server.

    Thank you.
     
Loading...

Share This Page