A Cloudflare domain redirect sends visitors from one hostname to another using an HTTP redirect rule. The source hostname must have a proxied DNS record so the request reaches Cloudflare; changing DNS alone does not create a browser redirect.
Use Redirect Rules for the forwarding behavior, and decide whether to preserve the original path and query string. We cover a whole-domain move, an alias that always sends visitors to one page, and a country-specific variation without creating any rules on your behalf.
Plan the destination before opening the dashboard
Choose whether each old URL has an equivalent destination. For example, a path-preserving move would send https://old.example.com/about/ to https://new.example.net/about/. A fixed redirect would send every matching request to one chosen URL instead.
These are different outcomes. Preserving paths is useful only when the new site actually has those paths. Sending every old article to the new homepage also loses the distinction between those pages. Write down the intended result for the homepage and a few representative deep URLs before deploying.
For a permanent move, Cloudflare's domain-forwarding example uses status 301. If the change is temporary, choose an appropriate temporary status rather than calling every redirect permanent. Do not deploy a permanent redirect while the destination is still uncertain.
Need the domain first?
Runs the same live check as the front page. If it is taken we will show you when it expires.
Prepare the source domain and proxied DNS
- Add the source or alias domain to Cloudflare and complete its activation. Keep control of the source domain's registration.
- Confirm that the hostname visitors will request has a proxied A, AAAA or suitable CNAME record.
- Include
wwwseparately if visitors also use that hostname. - Check that HTTPS works for the source hostname as well as the destination.
For an alias domain without an origin website, Cloudflare's domain-redirection documentation shows proxied A records for @ and www using the documentation address 192.0.2.1. This is a redirect-only placeholder, not the address of your destination website. Do not replace a working origin's address with it unless the hostname is intentionally becoming redirect-only.
If you need the proxy steps, see enable the Cloudflare proxy. Our DNS record guide explains why a DNS alias and an HTTP redirect are not interchangeable.

Create a path-preserving Redirect Rule
- In the Cloudflare dashboard, select the source domain and go to Rules > Overview.
- Select Create rule > Redirect Rule.
- Enter a descriptive Rule name, such as an alias-to-primary description.
- Under When incoming requests match, choose Custom filter expression.
- Match only the source hostname or source hostnames you intend to redirect.
- For the URL redirect, choose a Dynamic target and build it from the destination origin plus the request path.
- Select the appropriate status code and enable Preserve query string if the destination needs the original parameters.
- Review the expression and destination before selecting Deploy. Use Save as Draft instead if the rule is not ready.
The following illustrative match includes an apex and its www hostname. Replace both with your actual source names:
(http.host eq "example.com" or http.host eq "www.example.com")A dynamic destination based on Cloudflare's documented example is:
concat("https://example.net", http.request.uri.path)With query-string preservation enabled, a request for https://example.com/products/?color=blue would be directed to https://example.net/products/?color=blue. This is an illustration of the rule, not a report of a deployed redirect.
Keep the destination host out of the source condition when it belongs to the same zone. A broad match that also catches its own destination is a common way to create a redirect loop.
Redirect everything to one fixed page instead
If the source is an alias that should always lead to one landing page, use a static target URL instead of appending the original path. Keep the hostname condition narrow. Decide separately whether to preserve query strings; dropping them or keeping them can change campaign and application behavior.
The dashboard also offers All incoming requests. That option applies to all traffic in the rule's scope, so it should not be used casually when only one hostname or section should move. A custom hostname condition makes the intended boundary easier to review.
Cloudflare also supports wildcard matching and replacement. Do not mix wildcard replacement syntax with the dynamic expression above: they are different configuration methods. Follow the dashboard fields for the method you choose.
Country-specific redirects need a narrower condition
The earlier version of this guide described forwarding visitors from one country to a localized section. That remains a different intent from a permanent whole-domain move. Cloudflare documents country matching through the ip.src.country field.
For a Sweden-only homepage illustration, a constrained condition would be:
(http.host eq "example.com" and ip.src.country eq "SE" and http.request.uri.path eq "/")A static destination could then be https://example.com/se/. Limiting the source to the root avoids matching the localized destination repeatedly. Decide whether geographic forwarding is appropriate for visitors who prefer a different language, and test the redirect rather than assuming location equals preference.
Verify actual responses and destination pages
Test each source hostname over both HTTP and HTTPS. Include the homepage, a deep path and a URL with query parameters. Check the status and Location header without initially following the redirect:
curl -I https://example.com/products/?color=blueThen follow the chain to check where it ends:
curl -IL https://example.com/products/?color=blueConfirm that the destination loads the intended page, not just that a 301 exists. An HTTPS certificate problem at the source occurs before the browser can receive an HTTP redirect. A wrong destination path can also produce a broken landing page despite a technically valid redirect.
DNS caches can affect newly changed records, but do not blame every rule problem on propagation. If the hostname is already proxied, review the condition, target and other redirect behavior. Browser-cached redirects can complicate testing, so compare a fresh request with the browser result.
Rollback and related options
If tests reveal the wrong destination or a loop, disable the new rule and repeat the checks. Retain the previous DNS values before any change, particularly if the source originally hosted a real site. A redirect-only placeholder is not a rollback destination for that website.
For an origin-managed alternative, read 301 redirects in .htaccess. If the goal is only upgrading requests on the same host, use our HTTP-to-HTTPS Cloudflare guide instead. Our domain lookup tool can support registration research, but redirect verification requires real HTTP requests.
Frequently asked questions
Do we need hosting for a redirect-only alias?
Cloudflare documents an originless alias setup using proxied placeholder records and Redirect Rules. That does not remove the need to control the domain, activate its Cloudflare configuration and support HTTPS at the source.
Does a CNAME forward the browser to a new URL?
No. A CNAME changes DNS resolution. An HTTP redirect supplies a response directing the client to another URL. Configure the correct layer for the behavior you need.