Port forwarding not working for subdomain with origin rule

I have a https server running on port 8443 with a cloudflare origin rule set to URI Full starts with https://pay.domain.com rewrite to 8443

The https server is using the cert/key pem file generated by cloudflare and going directly to https://pay.domain.com:8443 works and shows a valid ssl connection/cert

When I go to https://pay.domain.com it shows a 520 cloudflare error
I've already cleared the cloudflare cache, my browser cache and flushed the dns locally
Was this page helpful?