Configuring a URL redirect

Create a new redirect to steer traffic from an old URL to a new, target URL. You can configure redirects over HTTP or HTTPS, select a path forwarding mode, and use wildcards to cover several URL path segments or subdomains with one redirect configuration.

Note: The URL redirects feature is available only in the IBM® NS1 Connect® Premium plan.

URL redirection (or URL forwarding) is a method for sending requesting clients to a different URL than the one they requested. On the NS1 Connect platform, you can configure a redirect over HTTP or HTTPS from a source URL corresponding to one of your existing DNS zones to a defined target.

During the configuration process, you will define the forwarding type, path forwarding mode, and HTTP protocol when redirecting incoming queries. Once complete, the platform will auto-generate a REDIRECT record type within the corresponding DNS zone containing the configuration details for this URL redirect.

Screenshot of the Create URL redirect page in NS1 Connect portal

Follow the instructions below to configure a redirect from a source URL (corresponding to one of your DNS zones) to a specific destination or target. Alternatively, if you are migrating your redirect configurations from a previous redirect service, refer to Importing a URL redirect filefor specific instructions.

Step 1: Create wildcard certificates. (Optional)

If you plan to create a redirect configuration that references multiple subdomains, you can preemptively generate a wildcard SSL/TLS certificate to cover all subdomains. If you do not do this before creating the redirect, the platform will automatically generate a certificate for each domain referenced in the redirect configuration once saved, in which case you might exceed the certificate generation rate limit for your account.'

Refer to SSL/TLS certificates for additional details and instructions for generating single-domain or wildcard certificates.

Step 2: Create a URL redirect.

Each URL redirect configuration specifies one or more source URLs, including the domain and path, and the target (destination) URL.

  1. Navigate to the Redirects tab in the main navigation.
  2. Within the Source and target URLs tab, click Create.
  3. Enter the first source URL, including relevant paths and, if applicable, wildcard (*) segments in the subdomain prefix and/or URL path. If the source URL you enter does not correspond to an existing DNS zone, you will be prompted to create the corresponding zone after saving the redirect.
    Note: When applying a wildcard to a subdomain prefix (*.example.com), each wildcard covers only one subdomain prefix segment. When applying one or more wildcards to the URL path, you can place a wildcard in the first and/or last segment, but not in a middle segment.
  4. (Recommended) Optionally, select the checkbox next to Enable HTTPS to allow redirects from browsers using the HTTPS protocol. If enabled, a second option appears to Enforce HTTPS, incoming requests must use the HTTPS protocol to be redirected to the target URL. Upon enabling HTTPS, the NS1 Connect platform automatically generates an SSL/TLS certificate corresponding to the domain of the source URL if it doesn’t already exist.
  5. Optionally, click Add URL and repeat steps 3-4 to specify multiple source URLs that should redirect to the same target (destination) URL.
  6. Under Define target URL, enter the Target URL. This is the intended destination to which incoming requests should be redirected.
  7. Select a forwarding type to indicate the type of redirect configuration you are creating:
    • 301 Permanent indicates to search engines that they should remove the old page from their database and replace it with the target page. This approach is recommended for SEO.
    • 302 Temporary is less common and indicates that search engines should retain the old domain or page indexed as the redirect is only temporary. While both pages may appear in search results, the search engine will prioritize the new page.
    • Masking (URL cloaking or domain masking) indicates that the browser should display the requested URL even though the content shown is generated from the target URL.
  8. Under Path forwarding mode, select on of the options: all, capture or none. Refer to Path and query forwarding for details.
  9. Optionally, select the check box to enable Query forwarding, in which case the query string from the incoming request is appended to the target URL.
  10. Optionally, enter one or more Tags (unique keys or key-value pairs) to the redirect configuration for internal reference.
  11. Click Save.

Step 3: Create missing zones, if applicable.

If the source URL you entered does not correspond to an existing DNS zone in your NS1 Connect account, you are prompted to create the missing zone(s) based on a “proposed zone” which is auto-generated to match the domain. You must also select a DNS network on which to publish the new zone.

  1. If prompted, click the pencil (edit) icon next to the first proposed zone to edit details.
  2. If desired, edit the proposed zone FQDN.
    Note: Each zone is associated with a fully qualified domain name (FQDN). If the source URL is a subdomain (foo.example.com), you can either create a subdelegated zone for the subdomain as-is, or you can create a zone to correspond with the root domain (example.com) with which this subdomain is associated. If you are unfamiliar with setting up subdelegations in DNS, we recommend creating a single zone corresponding to the root domain and associating all subdomains with that zone. This simplifies nameserver delegation at the domain registrar and makes it easier to manage DNS records corresponding to this domain and its subdomains.
  3. Select the DNS network to which the new zone should be published.
  4. Click the save icon to save your changes.
  5. Repeat steps 1-4 for all missing zones.
  6. Click Save.
    Warning: After creating a new zone, you must update the nameserver delegation at the domain registrar to point to NS1’s authoritative DNS nameservers.

Step 4: Resolve missing records, if applicable.

A REDIRECT record type has lower precedence than A, AAAA, CNAME, and ALIAS records created for the same domain. If a REDIRECT record exists with one of the other record types for the same domain, the redirect will not take effect. To activate the redirect configuration, you are prompted to delete the conflicting record(s).

  1. If prompted, review the list of conflicting record types. By default, they are all marked for deletion.
  2. If necessary, deselect the checkbox to prevent a record from being deleted.
    Warning: If you do not delete the record, the REDIRECT record will be created, but the redirect configuration will not take effect since the other record types will take priority.
  3. Click Save.