1

I have redirection from example.com/blog:

  • --> www.example.com/blog (making site with www prefix, using .htaccess)
  • --> www.example.com/blog/ (to end links with slash /, because of WordPress behaviour. Not-htaccess)

However, it takes about 1 second to perform that:

enter image description here

How can I make it faster?

4
  • 1
    300ms is pretty slow for a redirect. I think something is wrong with your server. It could be overloaded, or it could be misconfigured. Redirecting should only take tens of milliseconds, not hundreds. Feb 20, 2018 at 15:08
  • 1
    Have you attempted to take out that middle redirect by making the first redirect go directly to http://www.example.com/blog/ (including the trailing slash)? Feb 20, 2018 at 15:09
  • 1
    Please include the contents of your .htaccess file. Presumably, the trailing slash is being appended by WordPress (as you suggest), which would explain the second 735ms delay? The redirect to append the slash should certainly be moved to the .htaccess file, as Stephen suggests, to avoid any additional delay. You only need one redirect - for both actions. (Just to clarify, you are presumably already linking to the canonical URL - so these redirects are only dealing with edge cases?)
    – MrWhite
    Feb 20, 2018 at 16:09
  • 1
    Also what tool are you using to show the timings? It would be useful to know what the different colors mean?. It seems like that grey section is the biggest amount of time. What does that represent? Feb 21, 2018 at 12:29

0

Browse other questions tagged or ask your own question.