Actions reference - User documentation | Documentation

Actions reference

Actions are the operations that a rule must perform, and which can be defined in the third step of the rule edition form. This page presents the various action types supported by redirection.io.

Please note that one rule can perform several actions. The actions are performed sequentially - hence you can for example decide to add a custom HTTP response header, inject Structured data in the page and override the HTML "title" and "description" meta tags in one single rule.

Redirection [Permalink to this section](/content/documentation/user-documentation/actions-reference#redirection "Permalink to this section"/index.html)

The Redirection action generates a HTTP redirection.

If you are unfamiliar with HTTP redirections, please read first our guide about what is a URL redirection.

You can set up two parameters:

When hitting the "Use variable" button, you can reuse a marker that you may have defined in the "Source URL" trigger. This is useful to create dynamic redirection rules, that will use a part of the Source URL in the target location.

"Pro" plan project members can also use any request property in the redirection target URL. It can be:

This feature can be useful in many cases. For example, it can help create scenarios based on the value of a Cookie or any request header that your CDN could add, etc.

In order to add a header value in the redirection target URL field, proceed with the following steps:

  1. Hit the "Use variable" button. This will list the markers used during the "Trigger" step, and it also displays the link "Use a request property" - choose this option
  2. Fill the form in the lateral panel, to select the request property that you would like to inject in the redirection target URL
  3. Please note that transforms can be used to modify the injected value. For example, you may want to lowercase a header's value, or to perform replacements.
  4. The property appears in the "Target URL" field

Custom Status Code [Permalink to this section](/content/documentation/user-documentation/actions-reference#custom-status-code "Permalink to this section"/index.html)

The Custom Response Status Code action allows to force a given status code in the HTTP response.

Many possibilities are offered by this action:

Of course, you have to be careful when using this action, as it could generate HTTP errors if you configure it so!

All the standard status codes in the range 2xx - 5xx are supported.

Meta tag override [Permalink to this section](/content/documentation/user-documentation/actions-reference#meta-tag-override "Permalink to this section"/index.html)

When creating a website, it is a quite common SEO mistake to forget filling all the <meta> tags. Even optimized websites tend to have duplicates in page titles or description, which is usually not considered a SEO best-practice.

In order to avoid those issues, the SEO override action allows to fine-tune the content of this HTML meta-tags in the HTTP responses sent from your platform.

Consider, for instance, the following HTML page:

<!doctype html>
<html lang=en>
  <head>
    <meta charset=utf-8>
  </head>
  <body>
    <p>Here goes the page content.</p>
  </body>
</html>

Using the SEO override action permits to "fix" the page and inject meta tags:

<!doctype html>
<html lang=en>
  <head>
    <meta charset=utf-8>
    <title>Some unique title for this page</title>
    <meta name="description">Put here a unique description for this page</meta>
    <meta name="keywords">keywords, html, page, example</meta>
  </head>
  <body>
    <p>Here goes the page content.</p>
  </body>
</html>

We support the override of quite an extensive list of meta tags, which should cover most of the requirements.

Custom HTTP Header [Permalink to this section](/content/documentation/user-documentation/actions-reference#custom-http-header "Permalink to this section"/index.html)

Managing the HTTP response is not only a HTML or status code story; the redirection.io proxy can also help you add, delete or change response HTTP headers to the responses sent by your website.

The "Custom HTTP Header" action is a very flexible way to manage the responses sent to your users. It can be used to include custom headers required by your business (X-* headers), to add security headers, fix Content Security Policy Headers for a specific URL, etc.

The "Custom HTTP Header" action can perform several types of operation on Response Headers:

Please note that some of the editing modes listed above are not available with all proxies. For example, with the nginx module, it is not possible to override headers that are themselves defined by nginx directly. For example, the Server header, which is defined by nginx, cannot be removed by the nginx module. The redirection.io agent in reverse-proxy mode, on the other hand, correctly supports all the editing modes listed above.

As for the URL target of the redirection action, "Pro" plan project members can reuse any request variable in response header values:

Not comfortable with the notion of HTTP headers? You can check redirection.io recipes, to help you create rules that act on headers more easily.

Insert HTML Code [Permalink to this section](/content/documentation/user-documentation/actions-reference#insert-html-code "Permalink to this section"/index.html)

This action allows to embed the string of your choice at different positions in the HTML response. This can be useful to add a stylesheet, a javascript file, or some code.

Custom response body [Permalink to this section](/content/documentation/user-documentation/actions-reference#custom-response-body "Permalink to this section"/index.html)

This action is only available in "Pro" plan projects.

This actions allows to completely define the content of the response body. This allows to return HTML content, but also CSS stylesheets, javascript, SVG images, pure text/plain content, etc.

Besides defining the content of the response, the action also allows to select a value for the Content-Type response header.

Robots.txt management [Permalink to this section](/content/documentation/user-documentation/actions-reference#robots-txt-management "Permalink to this section"/index.html)

This action is only available in "Pro" plan projects.

This action can only be used when the "Source URL" is the URL of a robots.txt file, and it allows to serve a custom robots.txt file.

The action proposes 3 possibilities:

If the "Source URL" provided in the "Trigger" step is an absolute URL, we will automatically load your pre-existing robots.txt file:

Sitemap management [Permalink to this section](/content/documentation/user-documentation/actions-reference#sitemap-management "Permalink to this section"/index.html)

This action is only available in "Pro" plan projects.

Use this action to serve a sitemap.xml file at the location defined in the "Source URL" trigger.

This actions allows to define up to 50,000 entries in a sitemap content, and ensures that the provided sitemap content is valid.

Configuration [Permalink to this section](/content/documentation/user-documentation/actions-reference#configuration "Permalink to this section"/index.html)

This action is only available in "Pro" plan projects.

The Configuration action is useful to manage the redirection.io module behavior across your website. It allows to enable or disable the redirection.io processing altogether, or can just disable the logging of HTTP requests, which is something you may want to avoid logging sensitive data.

For example, you may want to disable the redirection.io module on your payment pages. You could also want to disable the logging on your user "change password" pages, etc.

Disabling redirection.io can be done using the "Reset previous rules" and the "Stop processing rules" options:

configuration "Stop processing rules" Disabled "Stop processing rules" Enabled
"Reset previous rules" Disabled The redirection.io rules execute as usual Actions defined in higher priority rules are not executed. Actions defined in lower priority rules and in this rule are executed.
"Reset previous rules" Enabled Actions defined in lower priority rules are not executed. Actions defined in higher priority rules and in this rule are executed. Actions defined in lower or higher priority are not executed. Actions defined in this rule are executed. Actions defined in other rules with the same priority may be executed.

Looking for an example of this action? Have a look at the "Redirect except a path" recipe!

This page has been updated on Apr 16, 2026

Can't find your answer?

Contact our support