Retaining Query String Parameters and Values in the URL


DNN converts the query strings in the URLs by default. The only parameter in the query string that remains as such is the UTM_parameter. Users may want to avoid their query strings being converted. This article provides information on how to retain a query string parameter and value in the URL. It also details how to apply this setting globally in Evoq 9.2.2. 




The reason why the UTM query strings are not rewritten is that they are included in the Keep in Querystring Regular Expression section in the AUM (Advanced URL Management). If you would like a specific query string not to be converted into paths, please follow the procedure below:

  1. Navigate to Settings > SEO.
  2. Go to URL Management > Expressions.
  3. Add the query for which you would like to avoid the conversion in the Keep in Querystring Regular Expression section.
    By default, the Keep in Querystring Regular Expression section contains the following:

    For example, if you want to retain the test-source query parameter, the Keep in Querystring Regular Expression section should be as follows:
  4. Click Save

  5. Clear your browser's cache, and try to load it again.
    For the test-source example, the link is


Back to top


Supplemental Information

The Keep in Querystring Regular Expression field has a global icon setting. In other words, this setting is a host setting and is applied to all sites in the installation. However, there is a bug in Evoq 9.2.2 that causes it to use the Portal setting instead of the Host setting. If you are using Evoq 9.2.2, to make this setting work globally, follow one of the options below:

  • Upgrade to Evoq 9.3.0.
    1. Download the relevant Evoq upgrade package.
    2. Follow the instructions in this article on Upgrading Evoq.
  • Manually insert the setting into the HostSettings table, and remove the configuration from the PortalSettings table.
    1. Go to Settings > SQL Console.
    2. Edit the HostSettings table by executing the command below:
                     FROM   hostsettings 
                     WHERE  settingname = 'AUM_KeepInQueryStringRegex') 
            INSERT INTO hostsettings 
            VALUES      ('AUM_KeepInQueryStringRegex', 
      '<Enter Date>', 
      '<Enter Date>'); 
    3. Delete the Portal specific setting and force the application to use the global value by executing the following command:
      DELETE FROM portalsettings 
      WHERE  settingname = 'AUM_KeepInQueryStringRegex' 


Back to top



When you go to the URL again, the query string persists.


Back to top




Please sign in to leave a comment.