WordPress.org

Ready to get started?Download WordPress

Forums

trailing slash redirect slowing time to first byte? (4 posts)

  1. VogonPoet
    Member
    Posted 2 years ago #

    I am trying to speed up my blog and specifically to reduce my Time To First Byte (TTFB). I know that I can do this by upgrading my host. I think an unwanted redirect is also a significant contributor to a large TTFB.

    Using Load Page Analyzer I try to analyze the following URL:

    http://keithhennessey.com/2012/03/19/eight-month-scoop/

    The result shows that it first tries to load without a trailing slash:

    http://keithhennessey.com/2012/03/19/eight-month-scoop

    This then gets a 301 redirect to the page I initially entered into the analyzer:

    http://keithhennessey.com/2012/03/19/eight-month-scoop/

    which loads successfully (result code = 200).

    The redirect is taking 1.08s, which is about half of my TTFB time. I'd like to try to eliminate it.

    Here is the link to the Load Page Analyzer result:

    http://loadimpact.com/page-analysis/keithhennessey.com-8e96c9de799605c5452137942e4dba05

    Note that this redirect does not occur when I analyze my index page:

    http://keithhennessey.com/

    loads fine with no redirect.

    But monthly archive pages and category pages do redirect.

    My WordPress Address and Site Address are both:

    http://keithhennessey.com

    and I am using this permalink structure:

    http://keithhennessey.com/2012/05/27/sample-post/

    One more thing -- I'm using CloudFlare. Not sure if that matters. If it did I would think the redirect problem would also apply to my index page. Since it doesn't I'm guessing it's a WordPress issue rather than a CloudFlare issue.

  2. VogonPoet
    Member
    Posted 2 years ago #

    If it matters I'm also using W3 Total Cache, with Browser Cache on and OpCode: XCache on a Dreamhost VPS.

  3. VogonPoet
    Member
    Posted 2 years ago #

    OK I have learned some more:

    • It's not CloudFlare
    • It's not W3 Total Cache or any other plugin
    • It's not my choice of permalink structure
    • It doesn't have to do with my www. settings

    I created a fresh new blog using DreamHost's one-click installer and used Load Page Analyzer on the built-in "Hello, world!" post. Got a similar 301 redirect on this post, which does not end with a trailing slash.

    The URL for the post is, where "test1" is the blog title:

    http://www.keithhennessey.com/test1/?p=1

    Load Page Analyzer shows a redirect, but from that address to that same address, which strikes me as odd.

    Here's the Load Page Analysis:

    http://loadimpact.com/page-analysis/www.keithhennessey.com-ab9a3451b8f3e43e2fff6ed864577215

    In this case it's wasting "only" 316ms on the redirect, compared to >1s on my real blog, but I figure if I can solve it here I'll save a second+ where I need it.

    What is causing the redirect? I assume it's something in WordPress, DreamHost's setup, or the interaction between the two, since (I think) I have eliminated all other variables.

  4. SlowClicksDotCom
    Member
    Posted 2 years ago #

    We're also looking for a solution to this, 6 seconds on our end using WPWebHost.

Topic Closed

This topic has been closed to new replies.

About this Topic