Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rules] New create DNS record pop-up #20276

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create a cache rule in the dashboard
---

import { Render } from "~/components";

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account and domain.
2. Go to **Rules** > **Overview**.
3. Next to **Cache Rules**, select **Create rule**.
Expand Down Expand Up @@ -41,3 +43,5 @@ head:
11. Under **Place at**, from the dropdown, you can select the order of your rule. From the main page, you can also change the order of the rules you have created.

12. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" product="rules" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Configure a Cloud Connector rule in the dashboard
---

import { Render } from "~/components";

To configure a Cloud Connector rule in the dashboard:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
Expand All @@ -34,4 +36,6 @@ To configure a Cloud Connector rule in the dashboard:

Alternatively, select **All incoming requests** to redirect all incoming traffic for your zone to the storage bucket you selected.

To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**.
7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy the rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create a compression rule in the dashboard
---

import { Render } from "~/components";

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
2. Go to **Rules** > **Overview**.
3. Select **Create rule** > **Compression Rule**.
Expand All @@ -17,3 +19,5 @@ head:
7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit rule expressions](/ruleset-engine/rules-language/expressions/edit-expressions/).
8. Under **Compression options**, set the [compression options](/rules/compression-rules/settings/#dashboard-configuration-settings).
9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create a configuration rule in the dashboard
---

import { Render } from "~/components";

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
2. Go to **Rules** > **Overview**.
3. Select **Create rule** > **Configuration Rule**.
Expand All @@ -17,3 +19,5 @@ head:
7. (Optional) To define a custom expression, use the Expression Builder (specifying one or more values for **Field**, **Operator**, and **Value**) or manually enter an expression using the Expression Editor. For more information, refer to [Edit expressions in the dashboard](/ruleset-engine/rules-language/expressions/edit-expressions/).
8. Under **Then the settings are**, add the [configuration settings](/rules/configuration-rules/settings/) you wish to change for requests matching the rule expression.
9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
4 changes: 4 additions & 0 deletions src/content/docs/rules/origin-rules/create-dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create an origin rule in the dashboard
---

import { Render } from "~/components";

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and domain.
2. Go to **Rules** > **Overview**.
3. Select **Create rule** > **Origin Rule**.
Expand All @@ -16,3 +18,5 @@ head:
6. Under **When incoming requests match**, define the [rule expression](/ruleset-engine/rules-language/expressions/edit-expressions/).
7. Under **Set origin parameters**, define the [origin rule settings](/rules/origin-rules/features/) you wish to change for requests matching the rule expression.
8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
13 changes: 6 additions & 7 deletions src/content/docs/rules/page-rules/manage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ You can manage Page Rules in the Cloudflare dashboard or via API.
To create a page rule in the dashboard:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain.
2. Go to **Rules** > **Page Rules**.
2. Go to **Rules** > **Page Rules**.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were strange characters instead of regular spaces.

3. Select **Create Page Rule**.
4. For **URL**, enter the URL or URL pattern that should match the rule ([more details about wildcard matching](/rules/page-rules/reference/wildcard-matching/)).
5. For **Pick a Setting**, select a [Cloudflare setting](/rules/page-rules/reference/settings/) to adjust. If desired, select **Add a Setting** to adjust multiple Cloudflare settings with the same rule.
6. In the **Order** dropdown, specify the desired order: *First, Last* or *Custom*.
7. To save, select one of the following options:
6. In the **Order** dropdown, specify the desired order: _First, Last_ or _Custom_.
7. To save and deploy your rule, select **Save and Deploy Page Rule**. If you are not ready to deploy your rule, select **Save as Draft**.

- **Save as Draft** to save the rule and leave it disabled.
- **Save and Deploy Page Rule** to save the rule and enable it immediately.
<Render file="rules-creation-dash-dns-popup" />

For ideas about what rules you can create, refer to [recommended rules](/rules/page-rules/reference/recommended-rules/).

Expand All @@ -55,7 +54,7 @@ You may also want to review the documentation on [wildcard matching](/rules/page
To edit a page rule in the dashboard:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain.
2. Go to **Rules** > **Page Rules**.
2. Go to **Rules** > **Page Rules**.
3. For a specific rule:

- To enable or disable the rule, select the on/off toggle.
Expand All @@ -76,7 +75,7 @@ To entirely replace the configuration of a page rule, send a [`PUT` request](/ap
To delete a page rule in the dashboard:

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com), and select your account and domain.
2. Go to **Rules** > **Page Rules**.
2. Go to **Rules** > **Page Rules**.
3. For a specific rule, select **X**. Then, select **Delete**.

</TabItem> <TabItem label="API">
Expand Down
13 changes: 13 additions & 0 deletions src/content/docs/rules/reference/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ If you are using [HTTP DCV](/ssl/edge-certificates/changing-dcv-method/methods/h

Cloudflare may remove the `Content-Length` header from responses delivered to website visitors. If the visitor must receive the `Content-Length` header, configure the origin server to include a `cache-control: no-transform` HTTP header in the response.

## This rule may not apply to your traffic

If your rule expression is matching a hostname for which you have not created a DNS record or are not proxying its traffic through Cloudflare, you will get a pop-up window with a couple of options:

- **If no DNS record exists for the hostname**: Whether to proceed with the rule creation or to create a new proxied DNS record for that hostname.
- **If there is a DNS record for the hostname, but traffic is not being proxied**: Whether to proceed with the rule creation or to enable proxying for the existing DNS record.

If you choose to create a new DNS record, the new record will have a `rules` tag and the following associated comment:

```txt
Created during Cloudflare Rules deployment process for <RULE_NAME>
```

## URL rewrites affect other Rules features executed later

If you rewrite a URI path using a [URL rewrite](/rules/transform/url-rewrite/), this may affect other Rules features executed later — such as [Origin Rules](/rules/origin-rules/) — if they include the URI path in their filter expression.
Expand Down
4 changes: 4 additions & 0 deletions src/content/docs/rules/snippets/create-dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ head:
content: Create a snippet in the dashboard
---

import { Render } from "~/components";

1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account and website.

2. Go to **Rules** > **Snippets**, and select **Create a Snippet**.
Expand All @@ -26,3 +28,5 @@ head:
8. Select **Done**.

9. To deploy your snippet, select **Deploy**. If you are not ready to deploy your snippet, open the dropdown next to **Deploy** and select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create an HTTP request header modification rule in the dashboard
---

import { Render } from "~/components";

Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Request+modification) for examples of rule definitions.

To create a rule:
Expand Down Expand Up @@ -46,4 +48,4 @@ To create a rule:

11. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

If you choose to deploy your HTTP request header modification rule, the new rule will be enabled. If you save the rule as a draft, the new rule will be disabled.
<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create an HTTP response header modification rule in the dashboard
---

import { Render } from "~/components";

Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Response+modification) for examples of rule definitions.

To create a rule:
Expand Down Expand Up @@ -47,4 +49,4 @@ To create a rule:

11. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

If you choose to deploy your HTTP response header modification rule, the new rule will be enabled. If you save the rule as a draft, the new rule will be disabled.
<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ head:
content: Create a rewrite URL rule in the dashboard
---

import { Render } from "~/components";

Refer to the [Rules examples gallery](/rules/transform/examples/?operation=Rewrite+URL) for examples of rule definitions.

To create a rule:
Expand Down Expand Up @@ -50,7 +52,7 @@ To create a rule:

9. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

If you choose to deploy your rewrite URL rule, the new rule will be enabled. If you save the rule as a draft, the new rule will be disabled.
<Render file="rules-creation-dash-dns-popup" />

## Wildcard pattern parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ However, the lists and rules only exist at the account level and every zone in t
4. (Optional) If necessary, select **Or use the expression editor** to edit the [rule expression](/rules/url-forwarding/bulk-redirects/concepts/#expression) or the [rule key](/rules/url-forwarding/bulk-redirects/concepts/#key).

5. To save and deploy the Bulk Redirect Rule, select **Save and Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ import { Render } from "~/components";

7. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

<Render file="rules-creation-dash-dns-popup" />

<Render
file="url-forwarding/requires-proxied-site"
params={{ forwardingRuleName: "Single Redirects" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
{}
---

If you are matching a hostname in your rule expression, you may be prompted to create a proxied DNS record for that hostname. Refer to [Troubleshooting](/rules/reference/troubleshooting/#this-rule-may-not-apply-to-your-traffic) for more information.