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.

Action types list

Redirection

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 setup two parameters:

  • the target of the redirection (ie., the URL that the user must be redirected to). This can be a relative or absolute URL (starting with http:// or https://).
  • the status code of the redirection - choose if it must be a permanent or temporary redirection;

Redirection action

HTTP 404 (Not found)

The HTTP 404 (Not found) action allows to "drop" traffic at the proxy level, by sending a 404 response. If you have recently removed content from your website and want to instruct bots and visitors to stop visiting these urls, this action can be useful and help save traffic on your backend stack.

Of course, you have to be quite careful when using this action, as this will willingly generate HTTP errors!

HTTP 404 action

HTTP 410 (Gone)

The HTTP 410 (Gone) action allows to "drop" traffic at the proxy level, by sending a 410 response. If you have recently removed content from your website and want to instruct bots and visitors to stop visiting these urls, this action can be useful and help save traffic on your backend stack. A 410 status code should be prefered if the page has completely disappeared, and you want to stop search engines from loosing time and resources visiting this page again.

Of course, you have to be quite careful when using this action, as this will willingly generate HTTP errors!

HTTP 410 action

Meta tag override

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>

Meta Tag override action

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

Structured data

The "Structured data" action allows to safely inject schema.org json-ld structured data, for build Rich Snippets in SERP. Structured data is often a misunderstood concept, but it is a very easy and convenient way of helping data automation and improve knowledge sharing. Read our knowledge base article about Structured Data to learn more.

redirection.io offers a free Structured Data Validator, which strictly validates the schema.org data that you would want to include in your website.

Using this action, you can choose from one of the proposed Structured data snippets, adapt it to your needs, and validate that the string going to be inserted in your web pages is valid and will be correctly interpreted by Search Engines.

Structured data action

Custom HTTP Header

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.

Custom HTTP header action

Custom HTML Code

This very generic 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 HTML code action

This page has been updated on January 11th, 2021.
Can't find your answer?