Importing a URL redirect file

If you are migrating your redirect configurations from a previous redirect service, you can import a CSV file containing the details of your redirect configurations.

Note: If the redirect file you plan to import contains multiple subdomains related to the same root domain, we recommend you generate a wildcard certificate prior to importing the file. This ensures all subdomains at that specific level are covered by a single certificate. Doing this can help prevent you from exceeding the rate limit which prevents you from generating more than 50 certificates for a single domain per week and more than 10 certificates for any domain per hour.

Step 1: Prepare the redirect configuration file.

Typically, you can export a redirect configuration file containing the necessary details from your current redirect service provider.

The table below explains the redirect configuration parameters that must appear as column headers in the CSV file exactly as they appear in the left column.

Warning: If the column headers are not written as they appear here, the import will fail. Ensure there are no extra spaces or characters, and that the values you enter in each row are in the proper format.
Column header Type Description Example
Domain string The domain associated with the source URL — as in, the URL you want to direct traffic away from. *.example.com
FromPath string The URL path associated with the source URL. The path must begin with a slash (/) unless you are using a wildcard (*) in the first URL path segment. /
Target string The domain and URL path, if applicable, associated with the destination — as in, the URL to which you want to redirect traffic. www.new.com
Tags array of keys or key-value pairs (Optional) A list of nominal keys or key-value pairs to apply to a redirect configuration. project:migration
ForwardingMode string (enum) Indicates the path forwarding mode to apply to a redirect configuration: all, capture, or none. Refer to Path and query forwarding for details. all
ForwardingType string (enum) Indicates whether or not to enable redirects over HTTPS. If enabled, you must generate an SSL/TLS certificate for the corresponding domain in the NS1 Connect platform. Refer to SSL/TLS certificates for details. permanent
HttpsEnabled boolean Indicates whether or not to enforce redirects over HTTPS. true
HttpsForced boolean   true
QueryForwarding boolean Indicates whether or not to append the query strings from incoming requests to the target URL. Refer to Path and query forwarding for details. false

Step 3: Add missing zones, if applicable.

If any of your source URLs in the imported redirect file do not correspond to an existing DNS zone, you must create the missing zone(s).

  1. Navigate to Redirects > Source and target URLs from the main navigation to view a list of redirect configurations.
  2. Note which source URLs appear with a warning icon next to them, indicating a missing zone. Tip: You can hover over each icon to determine whether it is due to a missing zone or conflicting record.
  3. Navigate to Zones from the main navigation to view a list of zones.
  4. Click Add zone.
  5. Enter the fully qualified domain name (FQDN) and other relevant details corresponding to the zone. Refer to Creating a primary zone for details.
  6. Save the zone.

After saving the zone, the warning icon should no longer appear next to the corresponding source URL(s) in the redirect configuration list.

Step 4: Delete conflicting records, if applicable.

When you save a redirect configuration, the NS1 Connect platform creates a REDIRECT record associated with the corresponding domain. The REDIRECT record type should not coexist with certain record types — including A, AAAA, CNAME, and ALIAS — for the same domain. If these conflicting record types exist for the domain, they will take precedence over the REDIRECT record and traffic will not be redirected. To resolve this issue after importing a redirect file, you must delete the conflicting record types.

  1. Navigate to Redirects > Source and target URLs from the main navigation to view a list of redirect configurations.
  2. Note which source URLs appear with a warning icon next to them, indicating the existence of a conflicting record type. Tip: You can hover over each icon to determine whether it is due to a missing zone or conflicting record.
  3. Navigate to Zones from the main navigation to view a list of zones, and click the name of the zone within which the conflicting record types exist.
    Note: If the redirect references a subdomain as the source URL, the corresponding zone may reflect the root domain. For example, a record for foo.example.com may exist within a zone corresponding to example.com.
  4. Review the list of records carefully, and delete any A, AAAA, CNAME, or ALIAS record types for the relevant domain only.

After deleting the conflicting records, the warning icon should no longer appear next to the corresponding source URL(s) in the redirect configuration list.

Step 5: Review the auto-generated SSL/TLS certificates, if applicable.

If a redirect configuration defined in the imported file indicates that HTTPS is enabled, the NS1 Connect platform automatically generates an SSL/TLS certificate for the corresponding domain. As a final step, review the SSL/TLS certificates generated based on your uploaded file to ensure they correspond to the appropriate domains. Refer to SSL/TLS certificates for details.