Cloudflare Docs
Rules
Rules
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Redirect all requests from one domain to another domain

In this example the original domain was replaced with a different domain. All functionality was maintained, except for the HTTP service (port 80) which was discontinued.

  1. Create a Bulk Redirect List with the following URL redirect:
  • Source URL: example.com/
  • Target URL: https://example.net/
  • Subpath matching: Enabled
  • Preserve query string: Enabled
  1. Create a Bulk Redirect Rule that enables this list.

This configuration will perform the following redirects:

Request URLURL after redirect
http://example.com/https://example.net/
https://example.com/https://example.net/
https://example.com/my/path/to/page.htmhttps://example.net/my/path/to/page.htm
https://example.com/search?q=termhttps://example.net/search?q=term