Rewrite.config how many rules are ok?

This might be a dumb question as i don’t know much about IIS servers but I’ve taken over our company website and I was having a look through the various files on the hosting and looked at rewrite.config. Hopefully I am correct in thinking it does similar to .htaccess (I’m used to linux/apache hosting) and contains various redirects etc and that it is called everytime a page is requested.

I’ve noticed in this case there are a whole lot of redirects in there (~2000) but I don’t know enough about IIS to know if this is an issue. I would never put this many redirects into .htaccess, not even 10% of that number as my understanding is the more you put in the more the server has to do before loading the page.

Am I correct in thinking this is a ridiculous amount of redirect rules? or doesn’t it matter for IIS


Yes, and Yes.

Yes, it’s a ridiculously large amount of rules but also Yes, it doesn’t really matter for IIS. IIS is only limited by file size (250KB) but even that can be tweaked in the registry.

But I would venture to guess there are some outdated entries in there, or even ones that can be tweaked to be more generic and combined with others. Some sanity checks should probably be made on the file.

it looks like when the site was rebuilt the old urls were different so they are redirecting. But rather than a blanket /old-url/* → /new-url/* they have had to do it individually for some reason. So pretty sure you are right that some can surely be combined and others are pretty old now and probably don’t even need to exist anymore.

Is this amount of rules likely to have a big effect on server response times? current response time is 0.93s according to pagespeed insights.


How long since the website was rebuilt? Could you do away with the redirects now?

1 Like

yeah I’m sure a lot could go. It was around 2018 so most of these links are ages old. I’d just need to check if there were any obvious ones that need to stay. Search Engines would have indexed all of the pages 100x over by now anyway and they are on our sitemap.xml file so they are easily indexed.

I find IIS unnerving for some reason, guess it’s having worked with linux for so long.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.