URL forwarding (or URL redirection) is a technique to make a single web page available via multiple URLs. NS1 Managed or Dedicated DNS users can configure URL forwarding (HTTP redirects or masking) between zones using the NS1 Connect portal or NS1 API.
Note
URL forwarding is available on all NS1 accounts by default. You can configure URL forwarding using the URLFWD record type. Please contact the NS1 support team if you experience any issues.
Warning
Currently, URL forwarding records do not support answering requests via HTTPS (SSL/TLS termination).
This article includes:
URL redirects can be configured by creating a URLFWD record associated with a specific zone. Follow the steps below to create a URLFWD record.
-
Navigate to DNS > Zones to view a list of zones associated with your account.
-
Click the name of the zone in which you want to set up a URL redirect. Within that zone, navigate to the Records tab.
Then, scroll to the bottom of the screen and click Add record.
Note
Adding a URLFWD record to a zone that contains another resource record with the same name may result in unexpected behavior.
-
In the Record Type drop-down menu, select URLFWD.
Specify the subdomain for which you want to apply the URLFWD record, or leave this field blank if you want to create the record at the root level.
Specify a TTL in seconds. Default is 3600 seconds. Learn more about Best Practices for TTL configuration.
Under “From,” add a source path (subdirectory) with/without a wildcard to the URL or enter a root “/”. This is the page from which users will be redirected away. You cannot leave this field blank. You must include a "/" to indicate the root-level path.
Under “To,” specify the target destination URL (including paths, if applicable). This is the page to which you want to direct end-users.
-
Select the type of URL path forwarding you are setting up: Permanent (301), Temporary (302), or Masking.
Permanent (301): This type of redirect indicates to search engines that they should remove the old page from their database and replace it with the new target page. This is recommended for SEO.
Temporary (302): Less common, this type of redirect indicates that search engines should keep the old domain or page indexed as the redirect is only temporary. While both pages might appear in the search results, a temporary redirect suggests to the search engine that it should prefer the new target page.
Masking: This type of redirect preserves the redirected domain in the browser's address bar. This lets users see the address they entered, even though the displayed content comes from a different web page.
-
Select an option next to Path Forwarding Mode. Path forwarding lets you forward the path after the domain name to the same path at the new domain.
Note
Refer to the end of this article for more information on path forwarding modes. Use path forwarding when the domain you are forwarding to has the same structure as the current domain.
There are three path forwarding modes where you can specify how you want to append to the target path:
All appends the entire incoming path to the target destination.
Capture appends only the part of the incoming path that corresponds to the *.
None appends no part of the incoming path.
Click the checkbox to enable Query Forwarding. In doing so, you allow the query string of a URL to be applied directly to the new target URL. The query is indicated by the first question mark ("?"). For example, http://sourceexample.com/page?val=34 where ?val=34 is the query attached to the end of the new target URL. If query forwarding is enabled, this segment of the path is automatically applied to the end of the target destination path. If query forwarding is disabled, the user is directed to the target destination (without the query appended).
-
To add another redirect for this zone, click Save and add record. Otherwise, click Save record. The new redirect appears in the list under the URL Forwards tab.
Note
It may take up to a few minutes for your changes to propagate.
Execute a PUT command to https://api.nsone.net/v1/zones/{zone_name}/{domain}/URLFWD to create a new URLFWD record.
For example:
curl -X PUT -H "X-NSONE-Key: $API_KEY" https://api.nsone.net/v1/zones/example.com/www.example.com/URLFWD -d '{"zone": "example.com", "domain": "www.example.com", "type": "URLFWD", "answers": [{"answer": ["/one", "http://one.com", 0, 0, 0]}, {"answer": ["/two", "http://two.com", 301, 1, 1]}, {"answer": ["/three", "http://three.com", 302, 2, 0]}]}'
where:
zone is the name of the zone to which you want to add the URLFWD record
domain is the FQDN within the zone to which you want to add the URLFWD record
type is the type of record you are creating (in this case, URLFWD)
-
each answer specifies five values:
"from" path (ex. /one, /two, /three) indicated by the query
domain (ex. http://one.com etc.) to which you want to redirect the query
forwarding type: either 0 (masking), 301 (permanent), 302 (temporary)
-
path forwarding mode: 0 (all), 1 (capture), 2 (none)
Refer to About path forwarding modes for details.
query forwarding enabled or disabled; either 0 (disabled) or 1 (enabled)
Similar structures can be used with GET or POST commands to retrieve or update the record. For more information, refer to the NS1 API documentation.
Navigate to DNS > Zones to view a list of zones associated with your account.
-
Click the name of a zone to view its details. Then select the URL Forwards tab to view all redirects associated with the selected zone.
Note
You can search the list of URLFWD records by name or filter by type (permanent, temporary, masking), the path forwarding mode, and/or by those with query parameter forwarding enabled.
Navigate to DNS > Zones to view a list of zones associated with your account. Then click the name of the zone you want to modify.
-
Select the URL Forwards tab to view a list of all active redirects associated with that zone.
-
Click the "edit" icon (pencil) next to the URLFWD record you want to edit. The Edit Answer modal should display.
-
Make the desired changes, and then click Save record.
Note
It may take up to a few minutes for your changes to propagate.
Navigate to DNS > Zones to view a list of zones associated with your account. Then select the zone you want to modify.
Click the URL Forwards tab to view a list of all active redirects associated with that zone.
-
Click the "delete" icon (trash can) next to the URLFWD record you want to edit. A deletion confirmation message should display.
-
Click Yes, delete redirect to confirm the changes.
Note
It may take up to a few minutes for your changes to propagate.
The information below describes each of the "Path Forwarding" modes configured within a URLFWD record.
A. Forwarding mode: “All”
This option appends the entire incoming path to the target destination. For example, if you configure the following redirect:

then the following example shows how the incoming path is appended to the target:
SEARCH (i.e., the incoming path) |
RESULT (i.e., what the user sees) |
---|---|
www.aaa.com/foo/bar |
www.new.com/target/foo/bar |
As shown here, the entire path the user searches for is applied to the new target destination.
Note
The incoming path must exactly match the defined "From" URL path's structure. Otherwise, their search will render "no match." For example, if the source path is defined as http://www.source.com/foo/* and a user searches for http://www.source.com/bar, they will not be redirected to the target destination.
B. Forwarding mode: “Capture”
This option appends only the part of the incoming path that matches the * in the source path structure. If you use the same redirect as above,

the following example shows how the incoming path is appended to the target:
SEARCH (i.e., the incoming path) |
RESULT (i.e., what the user sees) |
---|---|
www.aaa.com/foo/bar |
www.new.com/target/bar |
The path segment that matches the location of the asterisk (*) defined in the source URL path is applied to the new target destination. In other words, even though the user searched for “/foo/bar,” only the “bar” carried over as it correlates to the location of the * in the source URL path.
C. Forwarding mode: “None”
This option does not append any segment of the incoming path to the new target destination. In this case, all searches will redirect to the target destination exactly (depending on the structure) or render “no match.” If you use the same redirect as above,

then selecting "None" as the forwarding mode will render the following results:
SEARCH (i.e., the incoming path) |
RESULT (i.e., what the user sees) |
---|---|
www.aaa.com/foo/bar |
www.new.com/target |
www.aaa.com/bar |
No match* |
* "No match” is generated if the incoming (search) path does not adhere to the structure defined in the "From" URL.
Support for HTTPS: Currently, NS1 does not support automatic redirection from HTTPS addresses using a URLFWD record. Refer to the table below to see currently supported types of redirections.
From |
To |
Supported? |
---|---|---|
http://... |
http://... |
Yes |
http://... |
https://... |
Yes |
https://... |
https://... |
No |
https://... |
http://... |
No |