A Full Guide To Cloudflare

Hello,
I will show you how to easily set up Cloudflare, Edit Records, and Troubleshoot with images!

PLEASE READ BEFORE STARTING!!!


  1. Cloudflare cannot be used on free subdomains from InfinityFree
  2. You can use Cloudflare on Custom Domains (yoursite.com) and with Custom Sub-Domains (subdomain.yoursite.com)
  3. A video tutorial can be found at the end of this guide, should you get stuck.
  4. You must connect your domain to your InfinityFree account first. Read more here.

------- Set-Up Cloudflare -------

  1. Go to Dash.Cloudflare.com and create a new account (Or log in to your existing one)

  2. Add site (Blue Button)

  1. Go to the Domain Register for your domain (You can look it up by searching your domain here) and change the Nameservers to the ones provided by Cloudflare. (You may have to scroll down on the page to see this box with the nameservers. Note that you may have different nameservers from those shown here)
    Another Note: The Nameservers provided by Cloudflare should be the ONLY 2 nameservers on your domain. Remove all other nameservers!
    Nameservers - Cloudflare

  2. After changing the Nameservers with your domain register, click the “Check” button at the bottom of the page. Note that it may take up to 72 hours for Cloudflare to detect the change.

  3. Once the nameservers are verified, go to the DNS section of the dashboard.

  4. In the DNS section, click on the blue “ADD RECORD” button, then choose the “A” record type. (NOTE: Steps 6-8 may be done for you by Cloudflare!)

  1. In a new tab, go to app.infinityfree.net, login if needed, then select the hosting account you want to add Cloudflare for. Locate the IP address. (NOTE: Steps 6-8 may be done for you by Cloudflare!)
  1. Copy the IP address from the client area (app.infinityfree.net) and use it to create the following records: (NOTE: Steps 6-8 may be done for you by Cloudflare!)

RECORD #1
TYPE: “A”
CONTENT: “@”
NAME: IP address from app.infinityfree.net

RECORD #2
TYPE: “A”
CONTENT: “www”
NAME: IP address from app.infinityfree.net

Note: Keep the cloud orange for both of the records!

  1. Double-check that it looks right! (The yellowed out text should match all other yellowed out text)

  2. If something looks wrong, go back a few steps and see what you missed. If it all looks good, your site should start working within 72 hours. If it has been over 72 hours and it still does not work, try clearing your cache. If clearing the cache does not work, create a new topic in the “Hosting Support” category.

Yay! Cloudflare is now set up on your Domain!

-------Set-up Cloudflare SSL-------
Setting up Cloudflare DNS is quite easy! These steps are also outlined in the video below should you get stuck.

  1. Go to the SSL/TLS section on dash.cloudflare.com

  2. Click on the “Flexible” Setting (If you want to use the “Full” setting (which is more secure), you need to install an SSL certificate first (Self Signed is preferred for use with Cloudflare) - Video - KB article)

  3. Open "SSL/TLS” → “Edge Certificates" in Cloudflare, and enable (Green Slider) the Always Use HTTPS setting

  4. Open WordPress Admin and go to Settings → General. Change your URL from http:// to https://.

  5. That’s it! (If you go to “https://yoursite.com” it will no longer show the unsecured message!)

OPTIONAL: If someone goes to http://yoursite.com, they will not get the lock icon (They will get the unsecured message). So, you want to have everyone that goes to the unsecured version, automatically get redirected to the secure version! It’s easy to set up too!

Using Cloudflare (The easy way)

In the SSL/TLS → Edge Certificates tab, the setting “Always Use HTTPS” is set to On

Now, if someone goes to http://yoursite.com, they will be automatically redirected to https://yoursite.com! It’s totally secure now!

With .htaccess
  1. log in to your website so you can view its files (Using the online file manager or with FileZilla)

  2. If there is a .htaccess file inside of the /htdocs directory (It should NOT say “DO NOT EDIT” at the top!), add this code at the bottom of the file,

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

  1. If there is NOT a .htaccess file in the /htdocs, download the file below and upload it to the /htdocs directory

.htaccess (126 Bytes)

  1. That’s it! Note that it can take up to 24 hours for it to work!

Now, if someone goes to http://yoursite.com, they will be automatically redirected to https://yoursite.com! It’s totally secure now!

-------Troubleshoot Cloudflare-------

What? Cloudflare is not working? Click the arrow next to the text that best matches your issue for an answer. If you cannot get Cloudflare to work, watching the linked video may answer your questions.

My subdomain doesn't work with Cloudflare!

Remember, if you got the sub-domain from InfinityFree, it won’t work with Cloudflare.

If you have a custom subdomain (subdomain.yoursite.com):
A simple fix!
Create a new “A” record in the DNS section of Cloudflare

CONTENT: the name of the sub-domain, so “help” if the domain is help.yoursite.com
VALUE: the IP address of your main domain (Use set-up step #7 to find this)

I get a HTTP 500 error

Make sure you typed everything in correctly, and try clearing your cache or waiting for DNS changes to take effect (up to 72 hours)

SSL not working on my WordPress site

Well, WordPress is a little weird about this. Try installing the “Really Simple SSL” plugin on your WordPress site and let us know if it works!

Other

Watch the linked video, reply below, or create a new topic!
Note: If the issue is Cloudflare related, please include a screenshot of your DNS settings.

Did I type something wrong or forgot to add something? Let me know!

-------Video Tutorial-------

-------Final Notes-------

A big thank-you to @TigerMANEK426 and @KangJL for the edits!

22 Likes
SSL Dosent work
Cloudflare error: Your domain DNS is hosted by CloudFlare
What does infinityFree use?
Add TXT records on DNS
Site can't be reached
Https://publishers.propellerads.com/
Want to add srv and A records
cloudflare
"Your Key and Certificate directories are not properly protected"
Asset Cleanup and other tips to reduce CPU load
Sitemap error
Showing directory insteat of site
How do I finish cloudflare setup
How long does cloudflare take to update dns?
How long does cloudflare take to update dns?
Two "valid" SSL certificates, so site does not work on mobile
Cant upload CNAME
How to delete free ssl Generated by InfinityFree
Parking Page Question
Can’t load my website
MX Records are shown on cPanel but don't actually work
Issue with SSL
Mail with InfinityFree
Database Connection to Website
Cloudflare not in Vpanel
Issue with SSL
Is it Possible to use domains on InfinityFree without changing Nameservers . I.e. CNAME Records
Suspend domain while pointed the domain with cloudflare
Cloudflare setup (YES ik it's on the cPanel)
Cloudflare setup (YES ik it's on the cPanel)
Connect a domain using IP Adress
Https://forum.infinityfree.net/t/my-account-get-suspended-24-hours-after-24-hours-directly/14422
Can't Add Domain (Unsupported Domain)
How to get cloudflare protection
Connect a domain from cloudflare
Question about cloudflare
Critical path css generators not working
Connect a domain from cloudflare
Shift Name Servers to sectigoweb
Adding TXT Entry
Some question
Cloud Flare Connect
Using OpenGraph meta tags
Cloudflare Missing
Website doesnt work when VPN on
Domain Email address
The site and account are not working
Cloudflare
Account temporarily suspended removal request
Your account is Temporarily Suspended
Let's Encrypt & OpenGraph | Not Sub Domain - The certificate is not trusted in all web browsers
Having trouble installing statcounter on WordPress site
where are the settings for dns type A here?
What’s the purpose of “?i=1” on the end of a link?
Account temporarily suspended removal request
Need some Important info regarding Domain
Problem with my site
Problem with my site
How to fix google site key
How can i setting up a smtp for free?
DNS records
Website URL being appended to links
Can't host a subdomain
How to STOP DDoS Attack (Or at least stop some of them)
How to STOP DDoS Attack (Or at least stop some of them)
My website is not loading, unable to reach server https://techbibe.epizy.com
Need some Important info regarding Domain
cURL error 60: SSL certificate problem
Back online and then down again
How to setup cloudflare in free account
The site and account are not working
Professional email
Suspension notice
Ssl certificate issue
How to add A-records
Website not loading anything after domain renewed
I can't point my free domain to cloudflare
My site get /?i=1
Sub Domain
Unblock Port 80
I am Not getting Cloudflare In Vista Panel
Sub domain issue
Error 502 - Bad Gateway
Can't configure SSL
?i=i Problem with removing?
SSL certificate for Freenom domain installing throught Infiniti free?
SSL certificate for Freenom domain installing throught Infiniti free?
I can’t get Google to crawl site
Again about subdomains
Where is the cloudflare option on cpanel?
I want to know where to set domain nameserver in infinityfree
Website is not pinging after changing DNS
Not able to crawl my site https://onlinebankifsc.com/ for sitemap
Domain Misconfigured
SSL not working on chrome mobile
I want to remove my zero ssl serticate and put cloudflare ssl
The site and account are not working
My wp-admin is redirecting me to adds
TXT Record
I want to change my domain name on Infinityfree
Emails are not working
Emails are not working
My site just randomly stopped working?
Problem adding SSL certificate
How can I block access to my website to an entire country
Add CloudFlare to my website
How to add domain name to IF, but use Cloudflare to do so?
cURL configuration with your security certificate
Webpage Saving Speed and Cloudflare Question
Want to change Domain
I can't find cloudflare on the control panel
My cloudflare is not working
The JavaScript code is not allowed
Ssl Issues
GoGetSSL certified, but Softaculous says "Cannot find trustworthy SSL Certificate"
I have a domain from freenom but unable to create Subdomain
GoGetSSL certified, but Softaculous says "Cannot find trustworthy SSL Certificate"
GoGetSSL certified, but Softaculous says "Cannot find trustworthy SSL Certificate"
SSL CA Bundle
Pls how do i make pretty url through .htaccess (i'm stocked)
Where is Cloudflare? I couldn’t find Cloudflare in my dashboard
Randomly got an error: the site is unavailable
Mx records not working
MX records does not work with cloudflare and can not edit DNS in cloudflare
Help with changing DNS for cloudflare
How to get SSL "Full" to work on Cloudflare
ERR_SSL_PROTOCOL_ERROR after uploading cerificates
Can’t delete cname records in control panel
My website is not working
Problem adding SSL certificate
Email Accounts
Account state corrupt?
This site can’t provide a secure connection
Https:// not work in my domain
Cant load page all day
Subdomain ssl error
I cant add a mx record
Create TXT records
How to keep cname on subdomain
CloudFlare and Infinityfree, how to use?
Let's Encrypt asked to contact hosting provider that they need to update their panel to upload full certificate chain
Website was suspended as soon as i made it, no activity at all
Error during enabling cloudflare
Eu.org domain names possible?
How do I use bytefend on infinityfree?
RSS getting recognized as HTML
Let's Encrypt asked to contact hosting provider that they need to update their panel to upload full certificate chain
Unable to crawl my website pages please help
Issue with web hosting from hosting provider
SSL certificate error: The provider encountered an error verifying the DNS settings of your domain name
I have problem (WordPress + Cloudflare redirect loop)
Fix the certificate upload error!
No SSL certificate was found
Site not changing
WordPress error when saving: "There was an error. You are probably offline."
I can't park my domain though I add the NS record in cloudflare
Server Name Reset
/?i=1 is visible with my website link help
Is InfinityFree suitable (secure) for a services website?
Subdomain is not working
Ssl remove
Empty page when embedded
SSL request failing
Where do I set DNS records?
Website not working
Unstable Website
Facebook can't validate Let's Encrypt SSL Certificate, why?
My account has been automatically deleted, and I'd like to transfer to a different hosting account
This site can’t be reached
How to fix custom domain that can't be added in infinityfree
Website not Working
Not able to login to Wordpress
SSL certificate activation
My website with custom domain still not see after 2days
Account suspended for 24 hours for CPU limit?
SSL Certificate Questions - Renewal and more
My ezoic connected wordpress site suddenly has origin error
My site is suspended, but I have no message to say it is
To many Redirects Cloudflare
To many Redirects Cloudflare
Problem install wordpress
Questions about LifeSpan of SSL Certificates
Switched from GoDaddy and cannot figure out how to update Email settings
Ssl error help!
Ssl error help!
Ssl error help!
10000 forum users celebration - special event
SSL Timescale
Unable to get a redirect to https://
How to place geoblock?
Why is my website getting suspended?
Is using a self signed certificate over an .ml domain harm my SEO experience?
Unknown Cloudflare error when trying to re enable
Cloudflare + Infinityfree
Cloudflare + Custom Domain + InfinityFree == FAIL
Site suspended - "daily limits of your service"
How to setup website with Cloudflare
Could you could assist me in determining why my website opens so slowly and why the Facebook sharing debugger returns an error?
Hit limit question
SSL shop connection fails
Site Cannot Be Found
Moving To Cloudflare nameservers
Can i use SSL provider and domain bought outside of InfinityFree?
My website is redirected to suspended domain page
Is it OK to create a live streaming site (not hosted on IF at all)?
Entry process limit reached
SmartScreen block my page with /?i=1 suffix
I connected my site to cloudflare, but there is no dns setting and my site cannot be reached please
DNS error
Cloudflare Redirects me to "Suspended Domain"
Error 1016 help with SSL issue
Cloudflare and Infinityfree
Cloudflare redirect to suspended-website.com
WordPress problems in hosting
Merimade.fi at cloudflare's NS/cache can't get ssl or -> to free merimade.freecluser.eu to work?
Mysquavero.ga
My website is not opening
Very slow loading times
Cloudflarebug
Freenom Domain not connecting with new account although domain checker verifies dns
404 error
Setup cloudflare main domain
Can I point my domain to InfinityFree?
Is saying website isnt safe
The certificate chain referenced by 'cert-url' is invalid for the signed exchange
When i try to point A record on my website ip it is redirecting to suspendeddomain
When i try to point A record on my website ip it is redirecting to suspendeddomain
Error with wordpress
Website not working
Website not working
CloudFlare CDN using a plugin on a Infinity Free Subdomain
CloudFlare CDN using a plugin on a Infinity Free Subdomain
Help to migrate email from hostgator to infinityfree
Help My Website is Offline, ERR_CONNECTION_TIMED_OUT
My subdomain name can't be opened
Problems with my domain
Can't set up Cloudflare SSL on my site
Let's encrypt certificate shows Security warnings
SSL version of the website is not available
Dns email verification for zoho emails
Need help with email
?i=1
Dns_probe_finished_nxdomain
Dns_probe_finished_nxdomain
How to optimize site
Website Down
How can I use my domain here without using nameservers?
Some questions about cloudflare
Linking directly to images from another URL/forum?
Absurd
My free website taking too much time to load in first time, Help me plz
Error connecting automate.io to wordpress
Nameservers + Cloudflare
cUrl error 60
Setting up SSL
After switching from host This site can’t provide a secure connection
Error connecting automate.io to wordpress
Hit limit always reached even if no one visits the site
How to let my email host verify my domain name
DNS Managment
The digital certificate does not match the private key
The certificate chain referenced by 'cert-url' is invalid for the signed exchange
Why it keep showing disabled site?
SSL not working
PWABuilder can't find web manifest (403 error)
Please help me, all the three hosting accounts in my clien area were suspended because Infinityfree said that they were they suffered DDOS attacks
Website keeps getting suspended, help?
No one can visit my site
DNS Nameserver
They say they can't access my DNS records
How to Adjust Google Seo Settings for Epizy.com?
Arc.io Don't Supports my Website here on InfinityFree
The certificate chain referenced by 'cert-url' is invalid for the signed exchange
I can't use Cloudflare with my domain

Nice work. Should help people better as its more detailed!

Just a few things:

  • .htaccess don’t take 72 hours to work
  • Encourage the use of Full SSL
  • You have mixed CNAME and A records up
8 Likes

You need minimally a self-signed cert in order to use full mode

You can leave this out by using folowing setting in CF:-

  • In the SSL/TLS -> Edge Certificates tab, the setting “Always Use HTTPS” is set to On.
8 Likes

My site is still not secure

Are you using Cloudflare or the SSL integration in cpanel?

1 Like

cloudflare

Please don’t bring up your issue on multiple topics. I will reply in your original one.

1 Like

Hi, i’ve done everything like here and my site not working correctly


Everything i’ve descibed here:

You should not have ns records in Cloudflare. Please remove them.

1 Like

Where can I clear the cache?

To clear your computer DNS cache, you can follow this tutorial.


For the DNS cache of various DNS servers around the web, the only thing you can do is waiting until their cache expire, normally less than 72 hours.
4 Likes

The steps that I carried out to make it work were the following

  1. Follow the steps carried out in:
    https://support.infinityfree.net/domains-dns/add-your-own-domain/

2.- The steps mentioned above are correct, each and every one of them

In one of the hosting support post I remember reading that, despite the fact that it is configured in that way (even if it is the correct one), the hosting servers simply would not know how to redirect the requested traffic, because they do not know to what account The domain is linked so it redirects to https://suspended-website.com/(letras)/, then do the previous steps that I mention and then those of this post.

-_- me and then @anon2458064 both wrote articles on this, but good job

7 Likes

I know, I felt I could get more detailed, some did not understand your awesome one.

9 Likes

:slight_smile:

1 Like

So, on a more philosophical note, why should I use cloudflare, and do all that, since I can do it perfectly well with my original domain registrar (by creating a dns zone to help setup ssl with my hosting on InfinityFree)?

Because Cloudflare have advanced security, DDoS prevention, down detection, advance DNS and so much more. It also allows you to set up CA certificates, something you have to pay extra for with most domain providers. Oh, and Cloudflare is free.

5 Likes

Well, there’s some dodgy stuff circulating out there about cloudflare too though… I’m sure you’ve read them…

Cloud flare is a very good company
Heck,you’re even on cloud flare right now
Shopify,etc uses it

Well my sites are definitely not using cloudflare, I know that much.