Unable to do URL Forwarding

Hello, I tried to create a Page Rule to redirect the following URL, but it is not working since yesterday. Does anyone know how I can resolve the issue?

URL: *nif2023.macd.org.my/*
Forwarding URL (Status Code: 301 - Permanent Redirect, Url: https://macd.org.my/national-integrity-forum-2023)

I don’t see any DNS record for nif2023.macd.org.my defined. For any Page Rule to match, the corresponding hostname in your page rule needs to a) exist in your DNS records b) be set to proxied aka Orange-clouded.

Once you do that, a page rule can match.

However, keep in mind if you are trying to match multiple records with nif2023 in them e.g. abcnif2023.macd.org.my and xyznif2023.macd.org.my I don’t think you can do that with page rules as the wildcards don’t work quite like that. If you are trying to do that, it’s better to use the new Redirect Rules feature where you can define a rule to match a hostname that ends with nif2023.macd.org.my for example.

Thank you very much Simon. I have added the hostname in the DNS record. Apologies as I am not proficient with DNS. I have created the DNS record, however, the nif2023.macd.org.my now redirects the traffic to macd.org.my. I would like the redirection to go to https://macd.org.my/national-integrity-forum-2023 instead. How should I correct the rules settings?

Make sure you have the DNS record orange-clouded and ordered the page rules appropriately:

https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-#h_7rzfw5kI8cqu4VKur6Mnur

1 Like

Thank you Simon! This is resolved!

2 Likes

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