ERR_TOO_MANY_REDIRECTS redirected you too many times.

Posted October 10, 2019 669 views

I just set up SSL with my web app following the instructions provided in the document “” But since doing it, I have been getting the error “ERRTOOMANY_REDIRECTS”. Would my NGINX file be the problem? In case it can help, here is my NGINX file:

server {
   listen 80 default_server;
   listen [::]:80 default_server ipv6only=on;
   return 301 https://$server_name$request_uri;
server {
   listen 443 ssl;
   ssl_certificate /etc/letsencrypt/live/;
   ssl_certificate_key /etc/letsencrypt/live/;
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;
   ssl_ciphers AES256+EECDH:AES256+EDH:!aNULL;

   location / {
       proxy_redirect https://$host/;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection $connection_upgrade;
       proxy_read_timeout 20d;
edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello, @gwet

Can you try modifying the port80 server block to:

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

Test the nginx config file for syntax errors:

nginx -t

If all is good, restart and try again.

Let me know how it goes.

  • Hi,
    Thanks for your reply. I was able to make it work on Microsoft Edge (it actually works fine there). But I am still experiencing problems with google chrome. Maybe it has something to do with chrome’s settings.

    • If everything is working fine on Edge, then you can clear the browser’s history cache and clear the cookies. You can also open an incognito session in Chrome (Ctrl+Shift+N) and see how it works there. You can also open the site in third browser as well.

      Let me know how it goes.