Cloudflare Setup (with wrangler)

The following screenshots illustrate how to configure Cloudflare using the wrangler command line interface to deliver AEM content. Essential settings are marked with a red circle.

Create a Cloudflare site

Enter the domain:

Select a plan:

For this walk-through we’ll use the Free plan.

DNS Setup

We’ll skip the DNS setup step as this would be beyond the scope of this simple walk-through. Make sure the CNAME record is Proxied:

SSL/TLS Setup

Select SSL/TLS from the left pane and Edge Certificates in the dropdown list:

On the right side, scroll down to Always Use HTTPS and enable it:

Configure Caching

Create Page Rule

Create Worker

Fork or create a new GitHub repository using this template.

Clone the repository and follow the instructions in the README. You can skip directly to step 2.

After completing all steps you should be all set.