Domain Page Rules

We just imported the DNS for our Domain westlandswater.org and I am trying to forward all urls for this domain .westlandswater.org/ to wwd.ca.gov. I created the rule but it is not working can someone please help me resolve this issue.

Thanks,
Jas Singh

May be part of it?

Can you share a screenshot of the rule?

Your PageRule should look somewhat like this:

Option 1

URL: *westlandswater.org/* (matches root domain and ALL subdomains)
Rule: ForwardURL (302)
Target: https://wwd.ca.gov

Option 2

URL: *westlandswater.org/* (matches rootdomain and ALL subdomains)
Rule: ForwardURL (302)
Target: https://wwd.ca.gov/$2

The $2 will have the same value as the match of the second wildcard asterisk. So here a little example of the redirection in both cases:

Option 1

  • https://westlandswater.org/contact ==> https://wwd.ca.gov
  • https://www.westlandswater.org/contact ==> https://wwd.ca.gov

Option 2

  • https://westlandswater.org/contact ==> https://wwd.ca.gov/contact
  • https://www.westlandswater.org/contact ==> https://wwd.ca.gov/contact

So choose wisely what you want. After this has proven to work, change the redirection code to 301 which is a permanent redirect that will be aggressively cached.

Nice community name :slight_smile:

2 Likes

I modified the rules but it seems like it is still not working. Please see the attached file. I would really appreciate it if someone could help me.

Don’t worry, we got you. Should have mentioned, that all functions/services from Cloudflare mostly depend on: the DNS entry they should apply on must be proxied (:orange:) through Cloudflare.

So please set all of your DNS entries you want it to apply on to :orange:. Then wait some mins untill it propagated and then try again :slight_smile:

2 Likes

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