Hello,
I will show you how to easily set up Cloudflare, Edit Records, and Troubleshoot with images!
PLEASE READ BEFORE STARTING!!!
- Cloudflare cannot be used on free subdomains from InfinityFree
- You can use Cloudflare on Custom Domains (yoursite.com) and with Custom Sub-Domains (subdomain.yoursite.com)
- A video tutorial can be found at the end of this guide, should you get stuck.
- You must connect your domain to your InfinityFree account first. Read more here.
------- Set-Up Cloudflare -------
-
Go to Dash.Cloudflare.com and create a new account (Or log in to your existing one)
-
Add site (Blue Button)
-
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!
-
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.
-
Once the nameservers are verified, go to the DNS section of the dashboard.
-
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!)
- In a new tab, go to app.infinityfree.net, log in 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!)
- 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!
-
Double-check that it looks right! (The yellowed-out text should match all other yellowed-out text)
-
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.
-
Go to the SSL/TLS section on dash.cloudflare.com
-
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)
-
Open
"SSL/TLS” → “Edge Certificates"
in Cloudflare, and enable (Green Slider) theAlways Use HTTPS
setting -
Open WordPress Admin and go to Settings → General. Change your URL from
http://
tohttps://
. -
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
-
log in to your website so you can view its files (Using the online file manager or with FileZilla)
-
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]
- If there is NOT a .htaccess file in the /htdocs, download the file below and upload it to the /htdocs directory
.htaccess (126 Bytes)
- 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!