Getting to error => This page isn’t working redirected you too many times. ERR_TOO_MANY_REDIRECTS

Posted October 21, 2019 2.1k views

I added SSL using certbort from tutorial provided by digital ocean and redirect http to https but after this my site giving me error before this site was working fine with http://
My code of .conf is

<VirtualHost *:80>
DocumentRoot /var/www/domain/
ErrorLog ${APACHELOGDIR}/error.log
CustomLog ${APACHELOGDIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVERNAME} [OR]
RewriteCond %{SERVER
RewriteRule ^ https://%{SERVERNAME}%{REQUESTURI} [END,NE,R=permanent]


Please help with the solution

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, @enayat

You basically have a redirect rule that keeps running and therefore generating too many/infinite redirections.

Are you using a CMS like WordPress? Also do you use .htaccess files and if so can you paste the content of the file for the domain name in question as well?