1

Lets say I have the following:

subdomain: xyz.mydomain.com
my server's public DNS: xyz.fastserver.com

when someone goes to xyz.mydomain.com I want them to be redirected to

xyz.mydomain.com:8080 

I have full access to all the typical A(host), C(NAME) as well as SRV records etc, tried different configurations but cant get it to work.

Any ideas?

serenesat
  • 4,611
  • 10
  • 37
  • 53
arkadhar
  • 11
  • 3

2 Answers2

0

You did not explicitly specify it, but I assume you mean HTTP (i.e. web browsing) and not FTP, SIP, SMTP... and lots of the other protocols on the internet.

In this case what you are trying to do is not possible. DNS A/AAAA/CNAME records are only used to get an IP address, so you can not get a port with these settings. And SRV records are not used within HTTP, so you can not use it to specify the port too.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172
0

Link to previous post that goes over the difference between redirect, rewrite, and vhosts.

DNS, however, has no concept of "port" unless you make a special record (SRV) and then a special request to get that record. It is much more transparent to use one of the HTTP methods described above.

Community
  • 1
  • 1
Rick Buford
  • 629
  • 3
  • 4