I have 2 domains. One is hosted with google domains and the other with Namecheap. I don't really care which one I use as the primary or if I even end up using 2 for my purposes.

I would like to be able to do sub.domain.example and have it hit a IP using a certain port. Google domains will let me do this from 1 domain to another but it shows the hand off. So I go to sub.domain.example and it shows my redirect in the address bar as domain2.example:1234.

I want it to just stay in the address bar as sub.domain.example but hit my IP using the specific port and do a different port for a different sub.

I have an SSL cert rolling on 1 domain and google will make one on the other one easily.

I think I need a SRV record but I cant seem to get it to work.


It is not possible to do what you are asking [ for HTTP/HTTPS ] - Unfortunately - and I wish this were not the case, the protocol does not recognize SRV records or any equivalent structure.

Possible workaround -

  • Run a reverse proxy on sub.domain.com to pick up data off domain.2.com:1234 (this will push all the traffic through the subdomain proxy though). If, for example, you are running a service on port 1234 on an Apache webserver you can configure Apache with ProxyPass and ProxyPassReverse rules to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.