I have an A record in place that is proxied through the Cloudflare (orange cloud). I confirmed this because whatsmydns.net reports an entirely different IP for that A record. No other page rules are in place.
Your rule isn’t matching the URI scheme. It needs http:// in front for a full match.
If your site responds to www and non-www, it gets a bit trickier. You’d need two rules (one for each form), or for .htaccess to rewrite www to non-www, or vice-versa. Sites should stick with one or the other.
Thank you for the insight! Updating the origin URL to http://learntoprogramforfree.ga/* generates the 301 redirects as expected.
I added a second rule specifically for http://learntoprogramforfree.ga to http://test.learntoprogramforfree.ga, but it only works if I explicitly type “http://” before learntoprogramforfree.ga. If I type learntoprogramforfree.ga in my browser, I still get www.learntoprogramforfree.ga. Is there not a way to redirect all HTTP requests to a specific subdomain in one rule, much like GoDaddy’s forward functionality?
I understand if I had an htaccess file in place that would complicate the situation, but right now the A record for learntoprogramforfree.ga points nowhere (its just to enable the proxy) and there are no DNS records for www.learntoprogramforfree.ga. No server exists for learntoprogramforfree.ga.
Any additional suggestions would be much appreciated!