Non-www to www and nonssl to ssl

Having a hard time getting non-www to redirect to www, with and without SSL

(ex: http://example.com and https://example.com should go to https://www.example.com)

I can do it with ease on Apache, but can’t get it working here for a static page.

Use redirect rules…
https://dash.cloudflare.com/?to=/:account/:zone/rules/redirect-rules

Copy this example…

Ensure to add a proxied DNS record for @ as A 192.0.2.1 or AAAA 100::

1 Like

How does this look?

That should work, but it will only redirect example.com to https://www.example.com. If you want the redirect to include the path and any query parameters, you need to copy the example I gave.

This works. It will only be one static HTML page in the root directory.

Thanks for your help!