This tutorial will walk you through how to set up a domain redirect in your Cloudflare account. (This is assuming you’ve already added your domains into Cloudflare. If not, check out our Cloudflare setup tutorial and then come back to this article.)
Setting up a redirect means that you’re ensuring the www. and non-www. versions go to the same page . In our example, we’re using thehelpdeskteam.com, so we’ll be setting up the redirect for thehelpdeskteam.com to direct to www. thehelpdeskteam.com, so either version a lead uses goes to the same place.
Step 1: Confirm your DNS records.
- Log in to your Cloudflare account.
- Navigate to the DNS page using the blue buttons at the top of the screen.
- This is an example of what your setup may look like:

- Be sure you have these 2 CNAME records: the root domain, and www.
- style="margin-top:0;margin-bottom:0;padding-inline-start:48px;">
- The root domain will be proxied. The www. version will be DNS only.
- This is because we have the www. version in Referins under Settings > Domains.
Step 2: Set up a permanent redirect page rule.
- Navigate to Page Rules.
- Create Page Rule or click the tool icon to edit an existing rule.
- Create a permanent redirect, which is Status Code: 301.
- In the top section, enter your root domain, and be sure to include a /* at the end, like this: https://thehelpdeskteam.com/*
- The * functions as a wildcard.
- In the bottom section, enter the www. version, and include a /$1 at the end, like this: https://www.thehelpdeskteam.co...$1
- The $1 functions as a copy of the wildcard.
- Click “Save and Deploy” (or just “Save” if editing an existing rule.)
- If you wish to test this, do so after a few minutes so everything is loaded, and then proceed to open your URL in incognito mode.
Troubleshooting
Q1: I'm keep getting Funnel Error Code 500 - Failed to execute 'appendchild' on 'node'. This node type does not support this method, what should I do?

1. Login to Cloudflare
2. Click on your domain where you are seeing the 500 error code
Click on your domain where you are seeing the 500 code error

3. Click on DNS tab within the left menu

4. Click on Edit

5. Uncheck Proxy status

6. Click on Save

FAQ
Q1: What should I do if my domain redirect is not working as expected?
Ensure that your DNS records are correctly set up with the root domain proxied and the www version set to DNS only. Also, double-check your Page Rule settings to make sure the redirect is configured with the correct URLs and wildcards.
Q2: How long does it take for the domain redirect to become active?
The redirect should be active within a few minutes after saving and deploying the Page Rule, but it can take up to 24 hours for DNS changes to propagate fully. Clear your browser cache or test in incognito mode if changes do not appear immediately.
Q3: Can I set up multiple redirects using Cloudflare's Page Rules?
Yes, Cloudflare allows multiple Page Rules, and you can set up additional redirects as needed. Just ensure that the rules do not conflict and that you are mindful of Cloudflare’s limit on the number of free Page Rules.
Q4: What is the difference between a 301 and 302 redirect, and which one should I use?
A 301 redirect is permanent, indicating to browsers and search engines that the page has moved permanently to a new URL. A 302 redirect is temporary. For domain redirects like this, a 301 redirect is recommended to ensure proper indexing and SEO benefits.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article