How to avoid landing page redirects?


I’ve just updated my blog from a Centminmod installation to a EasyEngine one on my VPS. Everything is working, but I’d like to solve little issues to enhance my web performance.

I’ve made some testing with pages such as Pagespeed Tools and and in both cases there’s a problem with my landing page: the error shown is

"Avoid landing page redirects"

And the detailed message reads as follows:

 Avoid landing page redirects for the following chain of redirected URLs.

I’ve checked my nginx config files and I’ve tried several changes, but without success.

First, my Wordpress general settings is showing my homepage as

and not

But even if I change that, the error stays there.

My /etc/nginx/conf.d/ contains the following:

server {
        listen 80;
#       listen [::]:80;
#       return 301 https://$host$request_uri;
        return 301$request_uri;

And my /etc/nginx/sites-available/ is this:

server {

#   return 301$request_uri;

    access_log /var/log/nginx/ rt_cache_redis;
    error_log /var/log/nginx/;

    root /var/www/;
    index index.php index.html index.htm;

    include  common/redis-php7.conf;
    include common/wpcommon-php7.conf;
    include common/locations-php7.conf;
    include /var/www/*.conf;

As you can see, I’ve tried to include a permanent redirection but as far as I know this doesn’t work either.

The waterfall analysis on this tests show that this redirections are adding almost 1s in my load time (2.4s total currently). It’s a real pity, and I’d like to know how to avoid those redirects. Detail on the waterfall attached in case it can give more information. Thank you!

Did you verify that you WordPress-Settings are with https:// and with “www.”? Try:

wp option set siteurl
wp option set shome

Hope that helps… Kind Regards, -Ingo

Thanks, but it even makes the problem worse. After changing it to I had only two GETs instead of three. I guess there’s something in my nginx config files that isn’t right.

Look at your:


you disbaled this line:

   return 301 https://$host$request_uri;

and introduced this one:

   return 301$request_uri;

I think this causes the misbehaviour… Revert this and then check also all nginx-redirects and check also ‘wordpress-redirects’. You can get to your wordpress-options by entering (manual)

into your browser…

Hopy you will get this solved… -Ingo

Thank you again Ingo!

I’ve changed that line and I still get two GETs but I will check it later again to avoid the cache making the tests deceiving in this first moments.

I don’t know how to check eht nginx-redirects and the wordpress-redirects you talk about. I’ve checked the options.php like you mentioned and as far as I know everything is ok there (siteurl is “” for example).


I really don’t understand your problem.

If you don’t want the redirect from www to the domain, just don’t link anything with www and there won’t be any redirects.

What am I missing?

There’s nothing with www, at least not in the homepage. If you take a look at the waterfall attached on the first message, the first two GETs are to

That’s the right thing to do, but… why two (or three, in that case in the image) and not just one? That’s what I cannot explain myself.

You are wrong. There are several links pointing to Open the page source (CTRL-U, Command-U or whatever) and pay attention to all details.

Or try:

wp search-replace

But you should better understand what caused your problem first.

Right, thanks. I’ll try that search-replace to fix also those (again, they should all be to see if the problem goes away.

I don’t think it will though. I’m pretty sure the problem lies in my nginx config and some particular redirect I have (or haven’t) done.

You don’t have to mess with any Nginx configuration with EE. The defaults are pretty fine.

Fun fact: typing instead of in GTmetrix test avoids the second GET, obviously. Everything great over here, that was the problem.