Using Query Parameters With Redirects

When you set up a redirect in All in One SEO, you have some options on how to handle URL query parameters.

This is a hugely beneficial feature for anyone that uses URL query parameters to track how a visitor gets to your content.

A URL query parameter is a string that is appended to a URL like this:

  • Example URL without query parameter: https://aioseo.com/docs/using-query-parameters-with-redirects/
  • Example URL with query parameter: https://aioseo.com/docs/using-query-parameters-with-redirects/?source=aioseo_blog

In the examples above, the query parameter could be used for links to this article from the AIOSEO Blog. Then you can track this in Google Analytics or other analytics tools so you know how successful that link is and how many times it’s clicked on.

With the Redirection Manager in All in One SEO, you can choose how you redirect both URLs above (the one with and without the query parameter).

Let’s look at how to do this when you add a new redirect.

Query Parameter Settings for a Single Redirect

When you create a new redirect, you’ll see an Advanced Settings link to the right of the Redirect Type drop down

When you click on this link you’ll see the Query Parameters drop down.

You’ll see four choices as follows:

  • Ignore all parameters: If you select this, then any URL query parameters will be ignored and the source URL will redirect to the target URL
  • Exact match all parameters in any order: If you select this, then the redirect will match any URL query parameters you specify in the Source URL field. The plugin will ignore the order if you have multiple parameters
  • Ignore & pass parameters to the target: If you select this, then any URL query parameters will be ignored but will be passed to the target URL so that they’re preserved
  • Ignore all parameters except UTM: If you select this, then any URL query parameters will be ignored except for any UTM query parameters.

Query Parameter Settings for all Redirects

If you want to set the default for Query Parameters for all redirects, then start by going to Redirects in the All in One SEO menu and then click on the Settings tab.

Scroll down until you see the Redirect Defaults section and you’ll see a setting for Query Parameters.

You’ll see the same drop down with the same four options as described above. Whatever you set here will apply to all new redirects you create.

Check out more documentation on our Redirection Manager here.

This feature was added in All in One SEO version 4.1.0.