Magento 2 Admin Error ERR_TOO_MANY_REDIRECTS

Recently I had to deploy one newly build Magento 2 site to its server for which there was no info what has been installed or what is the infrastructure (the normal case where they don’t follow your requirements and are not giving much info).


After the deploy the Admin area was not working, it was in a Redirect loop (ERR_TOO_MANY_REDIRECTS). As usual, you can check the config, the DB if you forgot something, then StackOverflow where you can find a lot of fixes for this, like this one, setting your configs to

php bin/magento config:sensitive:set web/secure/base_url
php bin/magento config:sensitive:set web/secure/base_link_url
php bin/magento config:set web/secure/use_in_adminhtml 1
php bin/magento cache:clean

But might not fix the redirect loop.