Here's a simplified step-by-step guide to set up Cloudflare for your website:
-
Sign Up & Login:
- Visit Cloudflare's website and sign up for an account.
- Log in to your Cloudflare account.
-
Add Your Website:
- Click on the "+ Add Site" button.
- Enter your website's domain name and click "Add Site."
-
Select a Plan:
- Choose a plan that suits your needs. For most personal websites, the free plan is sufficient. Click "Confirm Plan."
-
DNS Records:
- Cloudflare will scan your domain's DNS records. Ensure all your DNS records are listed correctly.
- If any records are missing, you can manually add them, you can check the article here
-
Update Nameservers:
- Cloudflare will provide you with two nameservers.
- Log in to your domain registrar's website (e.g., YottaSrc, GoDaddy, Namecheap, etc.).
- Replace your current nameservers with the ones provided by Cloudflare.
- This step is crucial as it directs your domain's traffic through Cloudflare's network.
-
Wait for Propagation:
- DNS propagation can take anywhere from a few minutes to 48 hours. Once the nameservers update, your website will be active on Cloudflare.
-
Enable SSL:
- Go to the "SSL/TLS" tab in Cloudflare.
- Choose "Flexible" if you don't have an SSL certificate on your server, or "Full" if you do. If you're unsure, start with "Flexible."
-
Basic Settings:
- Auto Minify: Under the "Speed" tab, enable Auto Minify for JavaScript, CSS, and HTML to reduce file sizes.
- Always Online: Under the "Caching" tab, turn on "Always Online" to serve a cached version of your site if your server goes down.
- Security Level: Under the "Firewall" tab, set the security level to "Medium" to balance protection and user accessibility.
-
Page Rules (Optional):
- You can set specific rules for how Cloudflare interacts with different parts of your site. For example, you can bypass the cache for your admin area or set a browser cache TTL for static assets.
-
Monitor & Adjust:
- Regularly check the "Analytics" tab to see your website's traffic and how Cloudflare is benefiting you.
- Adjust settings as needed based on your website's performance and security needs.