How to use Cloudflare as a domain forwarder to another domain?

This can be used to save some money for domain forwarding at different providers.

You need to take the following steps to make the domain forwarding work correctly.

Adding the domain to the CloudFlare dashboard.

I am not going to take all the steps, you add the domain with the Free plan.
When you add the DNS records you need to set it as on the following image:

Explanation:

  • Ensure that your domain has proxied DNS A or CNAME records. You can use the IP address 192.0.2.1 for the A record, which allows Cloudflare to apply rules and redirects without routing traffic to an origin server .
  • Create two A records: one for the root domain (@) and one for the www subdomain, both pointing to 192.0.2.1 and set to proxied status.

Setting the DNS records at your domain register

After adding these DNS records you need to change the Nameservers at your domain register.
These nameservers are different for your account so use yours then check the change with the DNSChecker tool.

The DNS propagation can take up to 24h or more.

Creating the Page Rule for Redirection

You can set this without waiting for the full DNS propagation.

  • Go to the “Rules” tab in the Cloudflare dashboard and select “Page Rules”.
  • Click on “Create Page Rule”.
  • In the “If the URL matches” field, enter the URL pattern for the domain you want to redirect. For example, use *example.com/* to match all URLs on the domain.
  • In the “Pick a Setting” dropdown, choose “Forwarding URL”.
  • Select the status code for the redirect, such as 301 - Permanent Redirect or 302 - Temporary Redirect.
  • Enter the destination URL where you want to forward the traffic. Use wildcards to preserve the path and query strings. For example, enter https://newdomain.com/$2 to forward all paths and queries to the new domain.
  • Click “Save and Deploy Page Rule” to activate the redirection 


Setting Full SSL/TLS for the domain

After setting the Page Rule for the redirection you also need to change the SSL/TLS from Flexible to Full.
If you don’t do that you are going to get an error when testing the domain in the browser:

  • Go to SSL/TLS, then Overview.
  • Click Configure
  • Choose the Full Encryption and click Save.

Checking the redirection

You can just open a browser and check if the redirection is working after DNS is propagated.
You can also use a tool like https://httpstatus.io/ which will test the redirection chain.

  • Add your domains you want to check.
  • Click Check status.
  • Below you can find the results.

Where you can see that the redirection is working correctly and the domain is redirected to benoshop.hu.

You can also see that the Server is cloudflare which means that the request is managed by Cloudflare now correctly.

By following these steps, you can effectively use Cloudflare to forward one domain to another, ensuring that all traffic is seamlessly redirected to the new destination.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Peter Kulcsár - Independent Web Developer
    © 2025 - All rights reserved by Peter Kulcsár - KREMONT s.r.o.