Skip to content

How to Manage Bulk Redirects

This guide explains how to use the Bulk Redirects feature to efficiently manage large numbers of URL redirects for your domain. This is ideal for site migrations, SEO changes, or managing marketing campaigns.

Before you begin: You need to create a Firewall Rule that uses the redirect action and references your redirect list by name.

Accessing Bulk Redirects

  1. Navigate to your Domain Dashboard.
  2. In the main navigation, under the "Rules & Scripting" section, click on Bulk Redirects.

Understanding the Interface

The Bulk Redirects page is where you create and manage lists of redirects.

  • Redirect Lists: Redirects are organized into named lists (e.g., "Legacy Product Redirects"). Each list can contain thousands of individual redirect entries.
  • Redirect Entries: Each entry defines a single redirect from a source path to a target URL.

Creating a New Redirect List

  1. In the "Add New Redirect List" section, provide the following:
    • List Name: A unique, descriptive name for your list (e.g., product_migrations). This name will be used to reference the list in your firewall rules.
    • Description (Optional): A brief explanation of the list's purpose.
  2. Click Create List. Your new list will appear in the "Configured Redirect Lists" section.

Managing Redirect Entries

Once a list is created, you can add, edit, delete, and import redirect entries into it.

Adding a Single Entry

  1. Find your list and click on it to expand the details view.
  2. In the "Add New Redirect" form, fill in the details:
    • Source Path: The path part of the URL you want to redirect from (e.g., /old/product-page.html). Do not include the domain.
    • Target URL: The full URL you want to redirect to (e.g., https://www.yourdomain.com/new/product).
    • Source Domain (Optional): Only apply this redirect if the request is for this specific domain.
    • Source Scheme (Optional): Only apply this redirect if the request uses this scheme (http or https).
    • Status Code: Choose the HTTP redirect code. 301 for permanent moves, 302 for temporary ones.
    • Preserve Query String: If checked, any query parameters from the source URL will be appended to the target URL.
  3. Click Add Entry.

Editing or Deleting an Entry

  1. Expand the redirect list to view its entries.
  2. Find the entry you want to modify in the table.
  3. In the "Actions" column:
    • Click the Edit icon to make the row editable. Change the values and click the Save icon.
    • Click the Trash icon to delete the entry. You will be asked for confirmation.

Bulk Importing and Exporting

For managing a large number of redirects, using the import/export feature is most efficient.

  1. Expand the redirect list you want to manage.
  2. Scroll down to the "Bulk Import/Export" card.

To Export Existing Entries:

  • Click Export JSON or Export CSV to download all current entries in your chosen format. This is useful for backups or bulk editing.

To Import Entries:

  1. Prepare your file in either JSON or CSV format.
    • CSV Format: The file must have a header row with the following columns: source_path, target_url, status_code, enabled, source_scheme, source_domain, preserve_query_string.
  2. Click Choose File and select your prepared file.
  3. Click the Import button. The entries will be added to the list. If there are validation errors, they will be displayed below.

Activating Your Redirect List

Creating a list does not automatically make the redirects active. You must create a rule to apply it.

  1. Navigate to Rules Engine > All Rules.
  2. Click Add New Rule and select the Firewall phase.
  3. Create a rule that identifies the traffic you want the redirects to apply to. For example, to apply to all traffic, you can use a simple filter:
    • Rule Name: Apply Product Redirects
    • Filter: http.host == "yourdomain.com"
  4. In the Actions section, select the Redirect action.
  5. In the From List dropdown, select the name of the redirect list you created (e.g., product_migrations).
  6. Save the rule.

Your bulk redirects are now active and will be processed for matching traffic.