How can I reduce multiple redirects on my website?


I have a WordPress website that is hosted on Hostinger’s shared server with hPanel interface.

I am facing multiple redirects when typing http://www and it is using two redirects to reach to https://non-www. First it goes to https://www and then goes to the https://non-www version. This is increasing my website’s aggregate TTFB because each redirect is taking 500-800ms time.

I want to avoid the extra redirect of https://www

So basically what I want to achieve is this: - > without any extra redirect - > - >

Any requests http or https with or without the www will go to https://non-www

How can I achieve this and reduce my website’s TTFB?

Many thanks

It looks like, by default, Wordpress does two redirects for -

I agree that’s really broken, and there are two things to note. Firstly, if your WordPress site canonical URL on the Admin > Settings > General page is set to “”, you’ll only get one redirect from - that is, make sure is used everywhere your website may be advertised.

In Chrome now*, if you just enter “”, it defaults to I believe that Chrome is about to change to defaulting to “”.

  • not sure about the timing and believe this about to change any day now.

So, most of the time, in actual practice, this isn’t even a problem, as there will be one redirect only, especially as Chrome switches to a default of https. It’s important you run your Webpagetests with a URL of “” to avoid including redirect times in your tests, and thereby causing confusion.

The second point worth making is that this is easily fixed with explicit rules in your .htaccess file. I suspect you’ll need to craft them manually, just add them. The main thing you need to do is to add a redirect from “” to “” - that is, a single redirect to get in ahead of the default double redirect. There’s no point in adding in a redirect for the case as WordPress’s default will handle this normally.

Some redirect examples from stackoverflow (one example; there might be better methods but this is simple):

I hope this helps!

ps: another possible .htaccess solution - this redirects anything that is not to so would need tweaking:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

ALSO - worth noting - the TTFB for your site only comes from testing your site with its correct URL. If you are testing with non-correct URLs, you’re not seeing the real TTFB. Always test with the correct, final, official URL - ie the one in Admin>Settings>General.