Domain redirect not working for site is not redirecting to although I set the rules in cpanel redirection.

Host says that as I am using cloudflare DNS, that’s why redirect is not working.

How do I resolve this?

Something on your origin is redirecting www directly to the 404 page.

You have a CNAME in place in the Cloudflare DNS for ‘shop’ which is working so you could do the redirect on Cloudflare instead.

curl -I
HTTP/2 302
date: Sun, 19 Nov 2023 21:13:18 GMT
content-type: text/html; charset=UTF-8
x-robots-tag: noindex, nofollow
location: /404.html
cache-control: no-cache, no-store, must-revalidate
pragma: no-cache
expires: 0
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/\/report\/v3?s=NymPJ4inEpp86Qear5KRuaXsZJUnLPhxXVhGzB6itoyNMweSOVLpf5JhDZntY6yySVWVhpMkJeL1Ay43M5zpRYEjtyBVg4hXNg%2BKpLNkt5a0P%2FSzmcDCIforW1wiEF14K8wahtDJkA%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 828b74d06fe160f7-LHR

How do I do the redirect on Cloudflare?

I tried

Redirect Rules

URL equals

To redirect to


and it did not work

Like this…

Thank you. It worked for only

but it did not work for

How do I add that in?

Change “Hostname” “equals” to “Hostname” “is In” then enter and as 2 items in the same box one at a time.

Still did not work for

It was redirecting www earlier. Check the rule is enabled…

[edit] Just noticed there is a space at the end of in your screenshot. You can see it in the expression preview. Take that out.

It all works now, thank you for the fantastic suggestions