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.

Subdomain Redirect to IP

Discussion in 'General Discussion' started by rodolfo, Nov 10, 2004.

  1. rodolfo

    rodolfo Member

    Joined:
    May 18, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    How can be made a subdomain redirect to an IP address out of the server running the domain?

    Example :

    SSH/HTTP/FTP connecting to : subdomain.mydomain.com > 123.45.67.89

    Thanks for helping. :)
     
  2. fwwebs

    fwwebs Well-Known Member

    Joined:
    Feb 16, 2004
    Messages:
    329
    Likes Received:
    0
    Trophy Points:
    16
    You should be able to use a DNS A record for the sub-domain pointing to the IP address.
     
  3. rodolfo

    rodolfo Member

    Joined:
    May 18, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    I've done it !

    Thanks again
     
  4. timothee

    timothee Member

    Joined:
    May 25, 2003
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    How did you manage to get this working?

    With WHM it is easy, but I do not give any of my customers access to WHM, only to Cpanel. In Cpanel it seems you can only redirect to http:// addresses but I want for example a "news.mydomain.com" subdomain to be redirected to an IP address of a news server.

    Is this possible using Cpanel? If yes, how?
     
  5. rodolfo

    rodolfo Member

    Joined:
    May 18, 2004
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    The is no way to redirect a subdomain to an ip address trough cpanel.

    You must access WHM and edit the DNS setting for a given domain.

    - rodolfo
     
  6. JonathanW

    JonathanW Member
    PartnerNOC

    Joined:
    May 15, 2005
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Alabama
    cPanel Access Level:
    DataCenter Provider
    Would this also work redirecting it to a game server or teamspeak server like redirecting teamspeak.fc.aainel.com to the teamspeak server 72.36.180.122:8000 Could this be how you do this? I know somehow you can do it cuz my friend redirected 42nd.digiswitch.nl to one of my america's army servers and i just want to know how to.
     
  7. kaosent

    kaosent Active Member

    Joined:
    Jul 12, 2005
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    You can modify the .htaccess file with a set of apache mod_rewrite rules. I use this all the time to redirect users for a variety of reasons (i.e. rewriting query strings to hide the .php?... mess, and to redirect users to https, etc.). I am not sure what I would do in WHM to modify the DNS settings to accomplish this effect, perhaps I have something to read up on here.

    mod_rewrite isn't exactly the easiest syntax to master, and I ended up with countless 500 server errors while figuring it out, but http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html is a great reference.
     
Loading...

Share This Page