• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 614
  • Last Modified:

Redirect a subdomain to a different ip address.

I'm not sure if this is the right place to ask, but I'll give it a shot.

I have a hosted website and a private server that I would like to share the same domain name in a way.
When people go to www.mydomain.com I'd like it to go to the webserver and I set up a subdomain with the ip address for the private server as the redirected address so that I can go to telnet.mydomain.com 2066 and connect with a telnet session on port 2066 on the private server. But it doesn't seem to be forwarding it.

I don't have full access to the server as it's a hosted web site, but I have access to the cPanel (10.8.1) and can set up subdomains.

Any help would be appreciated! Am I barking up the wrong tree? trying to do something I can't?
2 Solutions
You would need to do this on the DNS level.  You can't set it up like a regular HTTP redirect and expect it to work with non-HTTP requests  If you aren't running the DNS servers that handle your domain, you would need to contact whoever is running them (your hosting company, probably) and ask them to set your sub domain to point to the private IP address.

Hope that helps! ;)
Tomeeboy is absolutely correct, you need to modify the DNS zone records for your domain.  Not all registrars or hosting companies will let you do this.  However, GoDaddy.com (one of the biggest) will allow it through their "Total DNS Control" tool.

If you aren't using godaddy as your registrar, then I'd recommend switching to them.

If you haven't mucked around in DNS records before, you may want to do some reading about 'A records' and 'cnames'.  I use one 'A' record for my website that points to my hosting provider.  So it looks like this: "Host: @  Points To:  TTL: 3600".  Then I have a CName that goes to another machine, for example, "CNAME: news  Points To: cnn.com  TTL: 3600".

Now 'http://server.com' goes to my website, but 'http://news.server.com' goes to CNN.  More importantly, if you telnet to news.server.com it is exactly the same as telnet to cnn.com.

GizaAuthor Commented:
Thanks for the help guys

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now