• Not Answered

Is there a limit to the number of re-directs that can be added within the 301 Redirect Module?

We have a very large amount of re-directs to set up and I'm hoping we're not limited to the number of re-directs we can set up.

 

Any help would be much appreciated.

7 Replies

  • Hi Daniel,

    Are you talking hundreds or thousands? We've done a few hundred without much issue. However, do note that the 301 redirect module (and even IIS' rewrite module) essentially have to intercept each request to determine if it matches a redirect URL, so there is a small performance hit to perform that lookup on each request. It's negligible with a few hundred, but I'm sure there would be a greater impact if it were substantially more.
     
    BHAVIK

  • I don't think that there is a limit for the number of redirects you can add.
  • In reply to Bhavik Patel:

    If I remember correctly, the 301 redirect module (not the Sitecore URL Rewrite module or the IIS REwrite module) is plugged into the 404 pipeline, so there's no lookup unless a Sitecore item isn't found. That's how we've configured ours, at any rate, though that may have been a customisation.
  • In reply to Bhavik Patel:

    Hi BHAVIK,

    Thanks for your response. I think we're talking hundreds but there is a case that down the line there may be more as the site expands which it will do on a considerable scale.

    Kind Regards

    Daniel
  • I do not know of a limit specifically for redirects, but I have run into the issue of exceeding the web configuration file default size limit of 250kb. Because of our large number of rewrites in the web.config and rewrite config file, IIS crashed with error "Cannot read configuration file because it exceeds the maximum file size". To fix I needed to increase size limit in Windows registry. The keys are:
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB
  • I'm not aware of a sitecore limitation, but browsers can give you issues with anything more than 15 redirects on a single request, (although that isn't a hard rule, sometimes you can get away with way more.)
  • In reply to Brian Heward:

    I've setup a custom 404 page that does my redirects programatically instead of having a huge number of rules though. that seems to work well.