From e5381095af19a95b1908b35c4a8f43bdcfa171cd Mon Sep 17 00:00:00 2001 From: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:43:37 +0000 Subject: [PATCH 1/2] [Rules] New create DNS record pop-up --- .../cache/how-to/cache-rules/create-dashboard.mdx | 4 ++++ .../docs/rules/cloud-connector/create-dashboard.mdx | 6 +++++- .../rules/compression-rules/create-dashboard.mdx | 4 ++++ .../rules/configuration-rules/create-dashboard.mdx | 4 ++++ .../docs/rules/origin-rules/create-dashboard.mdx | 4 ++++ src/content/docs/rules/page-rules/manage.mdx | 13 ++++++------- .../docs/rules/reference/troubleshooting.mdx | 13 +++++++++++++ .../docs/rules/snippets/create-dashboard.mdx | 4 ++++ .../create-dashboard.mdx | 4 +++- .../create-dashboard.mdx | 4 +++- .../transform/url-rewrite/create-dashboard.mdx | 4 +++- .../bulk-redirects/create-dashboard.mdx | 2 ++ .../single-redirects/create-dashboard.mdx | 2 ++ .../rules/rules-creation-dash-dns-popup.mdx | 5 +++++ 14 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 src/content/partials/rules/rules-creation-dash-dns-popup.mdx diff --git a/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx b/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx index b04d8f97744af68..47d79270fccf944 100644 --- a/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx +++ b/src/content/docs/cache/how-to/cache-rules/create-dashboard.mdx @@ -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**. @@ -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**. + + diff --git a/src/content/docs/rules/cloud-connector/create-dashboard.mdx b/src/content/docs/rules/cloud-connector/create-dashboard.mdx index bc0078dd340ebb4..328040abc624c0d 100644 --- a/src/content/docs/rules/cloud-connector/create-dashboard.mdx +++ b/src/content/docs/rules/cloud-connector/create-dashboard.mdx @@ -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. @@ -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**. + + diff --git a/src/content/docs/rules/compression-rules/create-dashboard.mdx b/src/content/docs/rules/compression-rules/create-dashboard.mdx index 37b1b7a6d0cfe4e..da24b5eaeac7c40 100644 --- a/src/content/docs/rules/compression-rules/create-dashboard.mdx +++ b/src/content/docs/rules/compression-rules/create-dashboard.mdx @@ -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**. @@ -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**. + + diff --git a/src/content/docs/rules/configuration-rules/create-dashboard.mdx b/src/content/docs/rules/configuration-rules/create-dashboard.mdx index 442dd37e57e58cf..0f9c6c0a628982c 100644 --- a/src/content/docs/rules/configuration-rules/create-dashboard.mdx +++ b/src/content/docs/rules/configuration-rules/create-dashboard.mdx @@ -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**. @@ -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**. + + diff --git a/src/content/docs/rules/origin-rules/create-dashboard.mdx b/src/content/docs/rules/origin-rules/create-dashboard.mdx index 1b0143b08b50b37..752b14e10a2e223 100644 --- a/src/content/docs/rules/origin-rules/create-dashboard.mdx +++ b/src/content/docs/rules/origin-rules/create-dashboard.mdx @@ -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**. @@ -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**. + + diff --git a/src/content/docs/rules/page-rules/manage.mdx b/src/content/docs/rules/page-rules/manage.mdx index 67c91f69ed76e15..cb68e678b03ec0d 100644 --- a/src/content/docs/rules/page-rules/manage.mdx +++ b/src/content/docs/rules/page-rules/manage.mdx @@ -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**. 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. + For ideas about what rules you can create, refer to [recommended rules](/rules/page-rules/reference/recommended-rules/). @@ -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. @@ -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**. diff --git a/src/content/docs/rules/reference/troubleshooting.mdx b/src/content/docs/rules/reference/troubleshooting.mdx index 814e6ac0970f5c0..9412b583e1ee38e 100644 --- a/src/content/docs/rules/reference/troubleshooting.mdx +++ b/src/content/docs/rules/reference/troubleshooting.mdx @@ -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 +``` + ## 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. diff --git a/src/content/docs/rules/snippets/create-dashboard.mdx b/src/content/docs/rules/snippets/create-dashboard.mdx index 3e2d9d007dbe183..b8750d95ad7b166 100644 --- a/src/content/docs/rules/snippets/create-dashboard.mdx +++ b/src/content/docs/rules/snippets/create-dashboard.mdx @@ -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**. @@ -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**. + + diff --git a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx index 519a8b1928b5f83..4346e1d52ecdae0 100644 --- a/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/request-header-modification/create-dashboard.mdx @@ -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: @@ -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. + diff --git a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx index 2bc3cc4690d786c..d4e60c2858a001e 100644 --- a/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx +++ b/src/content/docs/rules/transform/response-header-modification/create-dashboard.mdx @@ -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: @@ -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. + diff --git a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx index 6617236de8446e5..a70b26f79866ce6 100644 --- a/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx +++ b/src/content/docs/rules/transform/url-rewrite/create-dashboard.mdx @@ -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: @@ -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. + ## Wildcard pattern parameters diff --git a/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx b/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx index 50612f96b591509..89b2bfb51b7c99b 100644 --- a/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx +++ b/src/content/docs/rules/url-forwarding/bulk-redirects/create-dashboard.mdx @@ -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**. + + diff --git a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx index 875d3c96fd56c58..392c808c96deed9 100644 --- a/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx +++ b/src/content/docs/rules/url-forwarding/single-redirects/create-dashboard.mdx @@ -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**. + + Date: Wed, 26 Feb 2025 10:08:33 +0000 Subject: [PATCH 2/2] Update sentence (peer review) Co-authored-by: marciocloudflare <83226960+marciocloudflare@users.noreply.github.com> --- src/content/docs/rules/reference/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/rules/reference/troubleshooting.mdx b/src/content/docs/rules/reference/troubleshooting.mdx index 9412b583e1ee38e..b484dcca3b7af80 100644 --- a/src/content/docs/rules/reference/troubleshooting.mdx +++ b/src/content/docs/rules/reference/troubleshooting.mdx @@ -33,7 +33,7 @@ Cloudflare may remove the `Content-Length` header from responses delivered to we ## 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 your rule expression is matching a hostname for which you have neither created a DNS record nor enabled proxying 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.