Page Rule non-www to www 301 redirect not working?

Hey everyone, I set up a page rule to redirect my non-www URL to the www version.

From dorafans.com.hk/* to https://www.dorafanshk.com.hk/$1.

Here’s how it’s set up in Cloudflare:

However it’s not working. When I visit dorafans.com.hk, it returns the following errors:
https://dorafanshk.com.hk/ is unreachable.
ERR_ADDRESS_UNREACHABLE

Check if there is a typo in dorafans.com.hk.
DNS_PROBE_FINISHED_NXDOMAIN

Any advice on how to fix this? Thank you!

In order for page rules to work there needs to be a DNS entry and it must be :orange:. Right now the DNS entry is :grey:

dorafanshk.com.hk 300 IN A 184.168.131.241

1 Like

I am seeing the hostname is redirecting:

$ curl -svo /dev/null https://dorafanshk.com.hk/

< HTTP/2 301
< date: Mon, 17 Apr 2023 06:22:49 GMT
< location: https://www.dorafanshk.com.hk/
< cache-control: max-age=3600
< expires: Mon, 17 Apr 2023 07:22:49 GMT
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=URZlUjIPx9ZsjmfnjltT70YefBxCkbkdS%2FsOB0Y0UlsiLodmaIPpIB9LkqhvLXI6aBEMnVeawVr%2BYg26MX7ZJPqWKt%2BoKdbhz71NIqFNeUkWPWU0S%2FcWY8es8JWX8sOr29jb5EseNbutuBNKwa6TBw%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< server: cloudflare
< cf-ray: 7b929366a8ca5653-SIN
< alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
<
{ [0 bytes data]
* Connection #0 to host dorafanshk.com.hk left intact

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.