The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. Htaccess maximum size?

    Htaccess maximum size?

    Intermediate & Advanced SEO
    2 2 264
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DPA
      DPA last edited by

      Hello all,

      The company that develops our website recently contacted and asked me if we could remove a large amount of URL rewrites. I've described a few factors and my main questions below.

      Some information:

      • One year ago we did a large migration. We went from 27 websites to one main website.
      • We have got about 2000 rewrites in the htaccess file. And the file is 208kb.
      • A lot of links from our old domains still have incoming traffic which are handled by the rewrite rules mentioned above.

      Questions:
      The company that develops our website said that the htaccess file is too large and is causing or could be causing us website performance issues. They have asked us to remove URL rewrites.
      My question is:
      a) How many rewrites is too much? 
      b) Is the filesize of the htaccess of any importance or is it just the amount of rewrites in the file?
      c) Could we solve any potential server/website performance issues due to a large htaccess file in any other way? Increasing some values like 'post_max_size' or by any other solutions handled serverside?

      I do not have a lot of knowledge of htaccess rules but I've seen websites that handled over a million of rewrite rules. This is why I'm having doubts on whether removing URL rewrites is the only solution and possibly not the best solution for us.

      Hopefully you can help me any further and with the best way to proceed without losing traffic or causing 404 pages.

      Thanks in advance!
      Iordache Voicu

      1 Reply Last reply Reply Quote 0
      • KevinBudzynski
        KevinBudzynski last edited by

        If you have access to the main server's configuration file, place there. Code in httpd.conf is compiled on server restart where .htaccess is interpreted on every http request. The best way of doing it.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        • What to do about endless size pages
          94501
          94501
          0
          6
          87

        • Redirect Issue in .htaccess
          ThompsonPaul
          ThompsonPaul
          0
          2
          368

        • Redirects in .htaccess file
          Rebeca1
          Rebeca1
          0
          3
          86

        • Quick htaccess question
          Modi
          Modi
          0
          3
          130

        • Htaccess 301 regex question
          BlueprintMarketing
          BlueprintMarketing
          0
          6
          173

        • 301 Redirect htaccess
          Christy-Correll
          Christy-Correll
          0
          8
          256

        • How to fix a canonical problem with no htaccess?
          bronxpad
          bronxpad
          0
          3
          757

        • .htaccess code ?
          Marcus_Miller
          Marcus_Miller
          0
          2
          485

        Get started with Moz Pro!

        Unlock the power of advanced SEO tools and data-driven insights.

        Start my free trial
        Products
        • Moz Pro
        • Moz Local
        • Moz API
        • Moz Data
        • STAT
        • Product Updates
        Moz Solutions
        • SMB Solutions
        • Agency Solutions
        • Enterprise Solutions
        • Digital Marketers
        Free SEO Tools
        • Domain Authority Checker
        • Link Explorer
        • Keyword Explorer
        • Competitive Research
        • Brand Authority Checker
        • Local Citation Checker
        • MozBar Extension
        • MozCast
        Resources
        • Blog
        • SEO Learning Center
        • Help Hub
        • Beginner's Guide to SEO
        • How-to Guides
        • Moz Academy
        • API Docs
        About Moz
        • About
        • Team
        • Careers
        • Contact
        Why Moz
        • Case Studies
        • Testimonials
        Get Involved
        • Become an Affiliate
        • MozCon
        • Webinars
        • Practical Marketer Series
        • MozPod
        Connect with us

        Contact the Help team

        Join our newsletter
        Moz logo
        © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
        • Accessibility
        • Terms of Use
        • Privacy