New website in Cloudflare is offline

My website is offline. Message:

There were too many redirections.

Error Code: INET_E_REDIRECT_FAILED

How can I remove the HTTPS redirects in my origin server. (cPanel WHM) ?

Check your .htaccess file and create a Cloudflare Always use HTTPS Page rule

(Community Tip - Fixing ERR TOO MANY REDIRECTS):

1)Technical support has checked my htaccess file and said: “There isn´t any redirect code in your account’s .htaccess file.”.

2)Cloudflare Always use HTTPS: It is on.

The problem still remains.

What are your SSL/TLS settings and what is your domain?

www.internetearte.com.br

Configuration:

SSL: Full (strict)

Always Use HTTPS: On

Authenticated Origin Pulls: Off

Minimum TLS Version: TLS 1.0 (default)

Opportunistic Encryption: On

Onion Routing: On

TLS 1.3: Enabled

Automatic HTTPS Rewrites: On

What´s the problem?

Reading here the configuration there seems to be no errors. There must be some redirect rule on the backend.

http://www.internetearte.com.br/ redirects (by Cloudflare) to https://www.internetearte.com.br/

https://www.internetearte.com.br/ redirects (by origin server) to https://www.internetearte.com.br/index.php

https://www.internetearte.com.br/index.php redirects (by origin server) to http://www.internetearte.com.br/index.php

http://www.internetearte.com.br/index.php redirects (by Cloudflare) to https://www.internetearte.com.br/index.php

Your issue is in the third line. That is for sure a server redirect, done web server side (not via JS or something). So I would guess .htaccess it is.

1 Like

It looks like you’re running Wordpress and have it configured to use a site URL of http.

Add these to your wp-config.php file:

define( 'WP_HOME', 'https://www.internetearte.com.br' );
define( 'WP_SITEURL', 'https://www.internetearte.com.br' );
2 Likes

The technical support has created a file to prove that there is no problem with htaccess:
https://www.internetearte.com.br - Problem
https://www.internetearte.com.br/linkhost.php - No problem

I´m not running Wordpress. As a matter of fact, I´m running a model shop PRESTASHOP.

My config.inc.php file:

/* SSL configuration */
define(‘PS_SSL_PORT’, 443);

What do you think?

Based upon the settings you listed, Cloudflare should be fairly transparent regarding connectivity…unless you have a Page Rule set up that’s throwing a wrench into this.

If you go to the Cloudflare Dashboard in your Overview section, use Advanced to “Pause Website” and see if it starts working again.

1 Like

Yes, it works. The site is working again in this test. What should I do now?

There’s definitely a Redirect set at your server. No matter how I try to connect to your homepage, it ultimately redirects to http://www.internetearte.com.br/index.php

And Cloudflare Full (Strict) SSL will only connect to HTTPS. So that’s going to cause a redirect loop.

A quick fix would be to set SSL to Flexible. The right fix would be to get your site configured for HTTPS before switching it back to Cloudflare.

I´ve set it to flexible and it didn´t work. How can I configure my website to be Https?

Will the configuration below work?

define( ‘HOME’, ‘https://www.internetearte.com.br’ );
define( ‘SITEURL’, ‘https://www.internetearte.com.br’ );

1 Like
  1. Website is working but SSL is not enabled. I need SSL !!!

  2. There’s definitely a redirect set at my server. No matter how I try to connect to my homepage, it ultimately redirects to http://www.internetearte.com.br/index.php

  3. Cloudflare Full (Strict) SSL will only connect to HTTPS. So that’s going to cause a redirect loop.

  4. The right fix would be to get my site configured for HTTPS before switching it back to Cloudflare.

  5. As a matter of fact, the website is a online store PRESTASHOP.

  6. The technical support (LINKHOST - a web host in Brazil) has created a file to prove that there is no problem with my htaccess (when SSL is enabled):

https://www.internetearte.com.br - Problem
https://www.internetearte.com.br/linkhost.php - No problem

  1. My config.inc.php file:

/* SSL configuration */

define(‘ PS_SSL_PORT ’, 443);

  1. Someone told me to include this code in the file:

define( ‘HOME’, ‘https://www.internetearte.com.br’ );
define( ‘SITEURL’, ‘https://www.internetearte.com.br’ );

  1. Someone told me that to fix the problem I will need to edit my source code but I cannot do it (it is a online store PRESTASHOP).

Let me know if you need more information to solve the problem.

As you can see, the pure PHP file works on HTTPS. Your web application itself is redirecting HTTPS to non-HTTPS, you’ll need to figure this out somewhere in the plugin’s settings, we’re not familiar with how the application logic works and why it’s redirecting.

1 Like

#8, the Define Home/SiteURL is for Wordpress, which I thought you were using based upon screenshots I could find for your site. This assumption was incorrect, so that solution won’t work.

It is necessary to set the switch of the online store PRESTASHOP in the ON position for SSL. If not, PRESTASHOP prevents HTTPS.

2 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.