Inside this article, we'll go over the various columns and operators that are available when importing redirect rules from a CSV.
This article serves as a reference to use when defining rules and isn't meant to be a tutorial. If you're looking for more of a tutorial, see our article on importing redirect rules into Atomic.
Redirect Rule CSV Template
If you have existing rules, you can export your current redirects and make your changes there.
If not, you can download our redirects CSV template to get started.
Redirect CSV Columns
This column defines a basic path to redirect from.
If you want to perform redirects based on more than an exact path, see the fromPath column.
This column defines a basic path to set as the redirect destination, used in combination with the from column.
If you're redirecting from anything other than the basic from column, you'll want to use the toPath column instead.
Defines the scheme to be matched when applying redirect rules. If the scheme does not match, the redirect will not occur.
If left empty, all schemes will be redirected if other rules match.
Defines the domain that the rule will need to match for a redirect to occur.
If left empty, all domains will be redirected if other rules match.
This column is similar to the from column, but allows for additional parameters to be defined.
Redirect a static path:
Redirect if the path contains a string:
Redirect if the path starts with a string. Useful for redirecting entire directories:
Redirect if the path ends with a string. Useful for redirecting certain extensions:
This column matches query strings in the URL. Both keys and values can be matched. You can also apply additional parameters to your matches.
Redirect if the query string exactly matches keys/values:
Redirect if the query string contains a specific key/value pair:
Redirect if the query string starts with a specific key/value pair:
Redirect if the query string ends with a specific key/value pair:
Redirect if a key exists, regardless of the value:
Redirect if a key is empty:
This column will redirect any matches to the scheme specified. If no value is specified, the scheme will stay the same.
This column will redirect the URL to another domain. If left empty, the domain will remain unchanged.
This column defines a static path to the redirect destination. If left unchanged, the path will not change (but other rules may still change, such as query strings, the domain, scheme, etc.)
When performing any redirects are not using the simple to/from fields, any redirect destination paths are set here.
This column contains a list of query strings to be applied to the redirect destination.
The contents of this column can either update and append existing variables or replace all existing keys/values, depending on what's set in the queryMode column.
This column defines how the destination query strings from the toQueries column are handled.
This column defines the status code of the redirect.
This column defines if the rule is active or not.
This column is just a description of the rule.