Cloudflare – WWW REDIRECT CHECK FAILED. For Cloudflare to work properly, all site traffic must go through WWW

Home Forums BulletProof Security Free Cloudflare – WWW REDIRECT CHECK FAILED. For Cloudflare to work properly, all site traffic must go through WWW

This topic contains 8 replies, has 2 voices, and was last updated by  eveli 1 month, 4 weeks ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #37969

    eveli
    Participant

    Hello!

    I was trying to set up Cloudflare CDN on a website where Bulletproof Security plugin was installed. A warning showing up in the hosting panel stating:

    “WWW REDIRECT CHECK FAILED. For Cloudflare to work properly, all site traffic must go through WWW” until I replaced the .htaccess file with Bulletproof Security code with the original .htaccess file code.

    Can anybody suggest what to do to allow both – Bulletproof Security and Cloudflare to work?

    Thanks in advance!

    #37970

    AITpro Admin
    Keymaster

    I googled that error message and it appears to related to DNS and not htaccess code or BPS.  See this Cloudflare forum post for more information on the cause of the issue > https://community.cloudflare.com/t/dns-check-failed-domain-name-problems/108546

    BPS and Cloudflare work together.  I don’t think the issue is related to BPS and is some sort of DNS configuration issue.  There are few different setup/configuration differences depending on how Cloudflare is “installed” on your website.  ie Cloudflare “installed” directly from your web host or directly “installed” from the Cloudflare website or using a Cloudflare WordPress plugin.

    Another possibility is that you previously had some Cloudflare htaccess code in your Root htaccess file that did something for Cloudflare related to www redirection.  I have looked around for Cloudflare help on this, but it is very difficult to find help for Cloudflare because there are 3 different “installation/setup” possibilities and the Cloudflare help information does not distinguish between which type of “installation/setup” that a person may have and the differences between the different “installation/setup” types.  BPS creates backups of your root htaccess file in this folder:  /wp-content/bps-backup/master-backups/.  The backup files are named using a date/timestamp:  root.htaccess-{date-timestamp}.  If you find some Cloudflare htaccess code in a root htaccess file then post it in your forum reply so I can take a look at it.  I still think this issue has to do with DNS or some other web host configuration thing though.

    #37975

    eveli
    Participant

    I checked the previous .htaccess code and the only code that is there, is BPS code.

    As I had installed Cloudlfare directly from the host, I contacted the hosting provider at first to solve the issue with redirect and I got a reply that there was a rule in the .htaccess of the site that did not allow to properly redirect to WWW version. The hosting provider changed the .htaccess file to the default WordPress .htaccess file and the problem with redirect was solved.

    As the only code in .htaccess file was BPS code, I believe the cause for the issue is this code. What do you suggest?

    #37976

    AITpro Admin
    Keymaster

    The BPS htaccess file also contains the default WordPress htaccess rewrite code.  A standard BPS root htaccess file should do the exact same thing as a default WordPress htaccess file.  The only logical thing I can think of is that some additional custom htaccess code was added to BPS Custom Code that is causing the redirect/rewrite problem.  Copy your entire BPS root htaccess file code and post it in your forum reply so I can take a look at it.

    #38027

    eveli
    Participant

    This was the .htaccess file with which Cloudflare was not working:
    Do you know where the problem is?

    [Standard BPS root htaccess file – checked and deleted by AITpro Admin]

    #38028

    AITpro Admin
    Keymaster

    The BPS root htaccess file code that you posted is the standard BPS root htaccess file code without any additional custom htaccess code added in/to it.  The standard BPS root htaccess file/code does not interfere with Cloudflare.  Post your original htaccess file that works with Cloudflare so I can take a look at it.

    #38030

    eveli
    Participant

    This is the code of .htaccess file that works with Cloudflare:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    #38031

    AITpro Admin
    Keymaster

    hmm yeah that is standard default WordPress Rewrite htaccess code, which is exactly the same as the code in the BPS Root htaccess file.  BPS breaks up the lines of standard default WordPress Rewite htaccess code in the BPS Root htaccess file, but the code is exactly identical.  Maybe what is happening is your web host itself checks for the standard default WordPress Rewite htaccess code in the exact format that WordPress uses and displays that error message if the code does not match exactly?  You are going to need to contact your web host and ask them why this problem is occurring.

    #38035

    eveli
    Participant

    Thanks, will do that!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.