Question

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

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> ServerAdmin xxxx@xxxx.com DocumentRoot /var/www/domain/ ServerName domain.com ServerAlias www.domain.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on RewriteCond %{SERVER_NAME} =domain.com [OR] RewriteCond %{SERVER_NAME} =www.domain.com RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

Please help with the solution

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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?