Getting to error => This page isn’t working 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 DocumentRoot /var/www/domain/ ServerName ServerAlias ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

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


Please help with the solution

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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?