Redirecting a whole domain with Cloudflare

I had to run this site on for 24 hours due to a domain registration mistake I made.

Once I got working again I wanted to permanently redirect the URLs on the temporary site to their equivalent on the correct domain.

Since I was running the site behind Cloudflare, I could get Cloudflare to handle the redirects for me using a Page Rule, which support wildcards for redirects.

I used these settings:

This did the right thing - hits to e.g. redirect to

Here's a screenshot of the settings page I used to create the new Page Rule:

Screenshot of the Cloudflare interface. Create a Page Rule for  If the URL matches: URL (required)*  Then the settings are: Forwarding URL$1  Select status code (required) 301 - Permanent Redirect. Save and Deploy Page Rule

Created 2024-03-15T07:44:16-07:00 · Edit