Is there a way to avoid landing page redirects?

Used ee site create --wpfc to create a website and then added php7 support along with letsencrypt.

As far as I can tell, the tutorials for EE tell me to just go into WordPress -> Settings ->General and then change the two URL fields to

So that not only are all requests redirected to (which is what I want) but so that it also forces https:// as well.

However, when doing a GTMetrix test and just putting in for testing purposes, I get an F on the “Avoid landing page redirects” because it is adding time to redirect from to and then finally to

How can I avoid this? I have tried guides in the past (but EE tutorials can be so old at times) that have ended up throwing me into a 301 redirect loop and that’s not good.

I’m looking for how to properly setup EE to make all pageviews be no matter what the person puts in

Or is that type of redirection cycle GTMetrix is listing innevitable when I’m trying to force both https and www?

1 Like

I have the same issue. But not sure if it related to NGINX. I would like to hear what others have to say about this. I am almost sure that this is a wordpress issue.

1 Like

This is not an technical issue. It’s not Nginx’s or WP’s fault.

There is no way you the webserver can move user from to whithout at leas one redirect.

The solution is to publicize your final URL, not any alternative. Serving the final URL is the only way to avoid any redirect at all.

1 Like

Ah, my mistake. When doing the test using, the same score pops up.

Sorry about the confusion

Yes, if you intend your site to have the www, then when you make it just do ee site create --wpfc and since it defaults to there, no redirect. I think.

Seems to me though that, unlike EE3 when whichever of www or naked you choose for you site, the other of them will automatically redirect to the one you chose; in EE4 this is not the case? Instead, the resolve to you “default site” , the first one you installed on EE4. Is that how it is? Or is this a user error?

In EE3 you couldn’t create a site. Even if you tried, it would just create it as in the EE3 site list command.

This changed with EE4 though so you can create a account that automatically tells WordPress (and your SSL cert) that you don’t intend on using www.

Or you can create in EE4 and it tells wordpress and your SSL cert the website you intend to create.

I’ve always been a www. type of person since I’m old and that’s how it was back in the the late 90s. This was all just about an optimization question more than anything else

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.