Max number of redirects?

Is there a limit on # of redirects?

Hi, @bob, and welcome to our Netlify community site.

Are you asking about the number of rules which can exist for a site or how many redirects are allowed for a single HTTP request (as in how many “hops” are allowed).

If the question is about hops for a single HTTP requests, this is covered here:

https://docs.netlify.com/routing/redirects/rewrites-proxies/#limitations

Quoting:

By default, we limit internal rewrites to one “hop” — you cannot proxy from Netlify SiteA to Netlify SiteB to Netlify SiteC in a single request. This limitation may be amended for customers on a case-by-case basis. Contact support for more information.

If the question is about the total number of rules for a site, I’m not aware of a defined limit on this. However, we do encourage you to limit the total number of rules for the best performance of your site at Netlify.

Each additional redirect rule adds additional processing time to the HTTP request handling. So limiting the number of redirect rules will limit the amount of time spent doing redirect processing.

For example, if you have only twenty (20) rules, the impact to the site shouldn’t be noticeable. If you have a thousand (1000) rules, this may start having an impact on site performance.

Do you have a rough estimate of the number of rules you will require? If you give us some examples of the redirects which are required we may be able to suggest ways to create the rules in a more efficient way. (Maybe there isn’t a more efficient way, but we are happy to take a look to see if there are opportunities to restructure the rules or not.)

Thank you for the detailed response. I’m looking creating a type of redirect app, so it would no relate to hops. Given your comment about performance in high numbers it’s likely Netlify would understandably be a great fit for this case, but otherwise it looks like an awesome platform. Thanks for your help