EasyEngine redirect loop Let's Encrypt

Today I enabled Let’s Encrypt for one of my site. Then I got a redirect loop. I added following code to “server block”.

> return 301 https://www.drcrhub.com$request_uri;

Now my site redirect to https www to https non www. Also I added “https://www.drcrhub.com” as site URL and home page to my WP conf file.

How do I fix this matter.

Can you share the output of command ee site list for the further help?

Output is,


You shouldn’t add any 301 manually, since EasyEngine takes care of all configurations.

Remove your code from the server block, reload Nginx e celebrate your victory.

You need to remove those entries from your WPCONFIG file. You wordpress is redirecting to www and nginx is redirecting to non www. www and non www are different domains. You want to use one or the other. Non www is recommended. www is an artifact from the beginning of the internet when the same domain had more then just an http/xml web page. rss. usenet. news. aol. were all common for different versions of a site.

Using both www and non www hurts SEO too. Search engines treat both as unique domains and your traffic can get split. Keep the default 301 redirect and always use non www links everywhere. The 301 helps the old folks that cant stop typing www before everything. :wink: