<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I would suggest you avoid multiple redirects in the case a client connects with <a href="http://domain">http://domain</a>, because your current setup will make the client following this flow:<br><a href="http://domain">http://domain</a> > <a href="http://www.domain">http://www.domain</a> > <a href="https://www.domain">https://www.domain</a><br><br>This will hurt your TTFB. I suggest your first redirect should directly point to the HTTPS scheme.<br></div><div class="gmail_extra"><div><div class="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Wed, Sep 2, 2015 at 3:33 AM, <span dir="ltr"><<a href="mailto:fsantiago@deviltracks.net" target="_blank">fsantiago@deviltracks.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thanks. worked like a charm!<span class="im HOEnZb"><br>
<br>
On 2015-09-01 17:16, Francis Daly wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Sep 01, 2015 at 04:41:20PM -0400, <a href="mailto:fsantiago@deviltracks.net" target="_blank">fsantiago@deviltracks.net</a> wrote:<br>
<br>
Hi there,<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1.> redirect <domain> > www.<domain><br>
a.) if www is already present, skip to step 2<br>
<br>
2.> redirect <a href="http://www" rel="noreferrer" target="_blank">http://www</a>.<domain> request > https://......<br>
</blockquote>
<br>
<a href="http://nginx.org/en/docs/http/server_names.html" rel="noreferrer" target="_blank">http://nginx.org/en/docs/http/server_names.html</a><br>
<br>
Use two server{} blocks.<br>
<br>
One matches only www.* and redirects to https://$host$request_uri<br>
<br>
The other redirects to <a href="http://www." rel="noreferrer" target="_blank">http://www.</a>$host$request_uri<br>
<br>
f<br>
</blockquote>
<br></span><div class="HOEnZb"><div class="h5">
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>