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.

Hostname Redirect

Discussion in 'Bind / DNS / Nameserver Issues' started by jediN1nja, Nov 10, 2016.

Tags:
  1. jediN1nja

    jediN1nja Member

    Joined:
    Nov 9, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cape Town
    cPanel Access Level:
    Root Administrator
    Hi all,

    I've searched a few solutions and I'm struggling to get it working, so now I'm here hoping you guys can help me. I have a dedicated server for a client on domain subdomain.domain.co.za, on there I have one account admin.subdomain.domain.co.za (This is where my WordPress installation is at), also a shared IP.

    I have a domain on GoDaddy that I'm trying to point to the above shared IP but it keeps ending up on subdomain.domain.co.za/cgi-sys/defaultwebpage.cgi

    From what I understand this is a problem in the Apache config?

    I've tried the solution from this thread:
    Server IP Address
    As well as editing my Include Editor (Pre Main Include, Pre Virtual Include, Post Virtual Include).

    Here's the code I used:
    Code:
    <VirtualHost xxx.xxx.xxx.xxx:80>
        ServerName xxx.xxx.xxx.xxx
        DocumentRoot /home/user/public_html
        ServerAdmin my@email.com
    
        <IfModule suphp_module>
           suPHP_UserGroup user user
        </IfModule>
    
    </VirtualHost>
    
    <VirtualHost *>
        ServerName subdomain.domain.co.za
        DocumentRoot /home/user/public_html
        ServerAdmin my@email.com
    
        <IfModule suphp_module>
           suPHP_UserGroup user user
        </IfModule>
    
    </VirtualHost>
    But I couldn't get it to work.

    I tried simpler variations like a redirect in the Include Editor, but it then just ends up in a redirect loop.

    Please help, this is all new territory to me so please be gentle.
    I've only been used to shared hosting so far.

    Much appreciated!
     
    #1 jediN1nja, Nov 10, 2016
    Last edited by a moderator: Nov 10, 2016
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    174
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You want to redirect the domain hosted at godaddy to admin.subdomain.domain.co.za ... do you have such sub domain created in your cpanel account ?
     
  3. jediN1nja

    jediN1nja Member

    Joined:
    Nov 9, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cape Town
    cPanel Access Level:
    Root Administrator
    Well the DNS settings on that side only allows you to add an IP address for the A record, and because it's a shared IP it keeps going to subdomain.domain.co.za by default
     
  4. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    174
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    ok .. Well correct me if I am wrong...

    You have a domain registered on Godaddy and you are using Godaddy's name servers. The website for the domain is hosted on your dedicated server and you are trying to point the A record of your domain to your dedicated server .
     
  5. jediN1nja

    jediN1nja Member

    Joined:
    Nov 9, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Cape Town
    cPanel Access Level:
    Root Administrator
    100% correct. I don't know if it's worth noting that the dedicated server is not with GoDaddy.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,979
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I recommend reverting the previous changes you made to address the issue and troubleshooting the issue from the beginning.

    The subdomain should load as expected if you created a cPanel account for admin.subdomain.domain.co.za, and then went to your DNS provider's interface and setup the "A" record for that subdomain pointing to the IP address the account is assigned on the cPanel server.

    If you have done that, check to ensure the subdomain resolves to the correct IP address from your workstation.

    Thank you.
     
Loading...

Share This Page