How to make a DNS record based on the port it comes from

I want to make it so when people go to mysite.com:80 the DNS will return one address, but when they go to mysite.com:443 the DNS will return another address. How can I do that using cloudflare?

DNS and ports are two different worlds. What you want is not possible I am afraid. At best, you could have a Worker script, which forwards requests to different servers based on the port.

1 Like