Is there any way to resolve domain to another domain with port?

we know we can use CNAME to implement: access domain then resolve to a special domain like below:

domain1.com -> demo.com 
domain2.com -> demo.com
domain3.com -> demo.com 

but is there any way to implement resolve to a domain with port?

domain1.com -> demo.com:3201 
domain2.com -> demo.com:3202
domain3.com -> demo.com:3203 

EDIT:

I know use 302 can redirect to the special URL, but the domain in browser will change. is there any better way to implement it?


The only way to do what you ask is to use a reverse proxy to hide the “origin” server.

Essentially, you have a server listening on domain1.com and it forwards the traffic to demo.com:3201.

DNS cannot do what you ask.