diff --git a/src/content/docs/rules/url-forwarding/examples/redirect-all-different-domain-root.mdx b/src/content/docs/rules/url-forwarding/examples/redirect-all-different-domain-root.mdx index 87409c0499810bc..31979c96efb6e03 100644 --- a/src/content/docs/rules/url-forwarding/examples/redirect-all-different-domain-root.mdx +++ b/src/content/docs/rules/url-forwarding/examples/redirect-all-different-domain-root.mdx @@ -8,30 +8,32 @@ description: Create a redirect rule to redirect all URLs for a domain to point to the root of a new domain, including any subdomains of the old domain. --- -import { Steps } from "~/components"; +import { Example } from "~/components"; In this example, an old website was discontinued and replaced by a new one in a different domain. The functionality is different, and all URLs should now point to the root of the new domain. The same applies to any subdomains of the old domain. - +[Create a redirect rule](/rules/url-forwarding/single-redirects/create-dashboard/) with the following configuration: -1. Create a Bulk Redirect List with the following URL redirect: + - - **Source URL**: `example.com/` - - **Target URL**: `https://example.net/` - - **Subpath matching**: Enabled - - **Include subdomains**: Enabled - - **Preserve path suffix**: Disabled +**When incoming requests match** -2. Create a Bulk Redirect Rule that enables this list. +- **Wildcard pattern** + - **Request URL**: `http*://*example.com/*` - +**Then** -This configuration will perform the following redirects: +- **Target URL**: `https://example.net/` +- **Status code:** _301_ -| Request URL | URL after redirect | -| ----------------------------------------- | ---------------------- | -| `http://example.com/` | `https://example.net/` | -| `https://example.com/` | `https://example.net/` | -| `https://subdomain.example.com/` | `https://example.net/` | -| `https://example.com/my/path/to/page.htm` | `https://example.net/` | -| `https://example.com/search?q=term` | `https://example.net/` | + + +For example, the redirect rule would perform the following redirects: + +| Request URL | Target URL | Status code | +| ----------------------------------------- | ---------------------- | ----------- | +| `http://example.com/` | `https://example.net/` | `301` | +| `https://example.com/` | `https://example.net/` | `301` | +| `https://subdomain.example.com/` | `https://example.net/` | `301` | +| `https://example.com/my/path/to/page.htm` | `https://example.net/` | `301` | +| `https://example.com/search?q=term` | `https://example.net/` | `301` |