DNS api.urlname.com ---> xxx.xxx.xxx.xxx:port

I would like to have the subdomain name api.urlname.com point to a port on an EC2 server (which I can already access at xxx.xxx.xxx.xxx:3000) I already have the urlname.com point to ports 80 and 443…

Thanks for your help.

There are a few ways to achieve this.

You could unproxy the hostname, and use http://api.urlname.com:3000.
You could use Cloudflare Spectrum on an Enterprise Plan.
You could use the PortZilla app.

None of the above are ideal, and the best solution is to have your Origin web server run on the standard HTTPS port, 443 (or 80).

Without Spectrum, you cannot use https://api.urlname.com:port on a proxied hostname when port is not one of the supported ports. Also, many Cloudflare features (like caching) do not work unless you are using the standard 443 and 80 ports.

Thank you very much for your help.

  1. What does it mean to unproxy a hostname ?
  2. Portzilla seems to work quite well for what I am trying to achieve. Thank you for this suggestion.

Best regards,

Stuart

In the DNS panel there is a Proxy status setting on each DNS entry. If it is :orange:, it means users hit Cloudflare, and all of Cloudflares services, caching, firewalling etc. apply to the traffic. Users do not hit your backend directly. If it is :grey:, you are only using Cloudflare for DNS resolution, and it means that any DNS lookup will return the IP address of your origin, none of Cloudflares services will apply, and all users will hit your origin directly.

To unproxy you click edit beside the DNS entry in question, and click on the :orange: icon. It will turn to :grey:, and you can click save. If you unproxy, apps like PortZilla will not work either. You generally need to unproxy for services that are not HTTP based, such as SFTP, FTP, SSH, and email protocols like SMTP, POP3 and IMAP.