DEV Community

Cover image for Log014_CloudFlare_Zoho.mail_ec2.md
Thomas Jager
Thomas Jager

Posted on

Log014_CloudFlare_Zoho.mail_ec2.md

Start-here.page=about.post

๐Ÿ“… Date: 2025-09-04

๐Ÿ”ง Tools: Cloudflare, Zoho Mail, AWS EC2, Elastic IP, Apache, Certbot (Letโ€™s En$


How It Started:

Todayโ€™s goal was to protect my website. I decided to start with Cloudflare and $


The Problem

To have a proper setup I needed:

  • Email address for the domain

  • DNS records for website + mail

  • Static IP for my AWS instance

  • SSL certificate installed directly on the server

The Fix

  1. Domain + SSL via Cloudflare:
  • Bought a domain on Cloudflare

  • Activated free SSL included in the plan

  1. Zoho Mail setup:
  • Used Zohoโ€™s free plan (5 GB/mailbox, up to 5 accounts)

  • Authorized DNS with Zoho and added MX records (mx.zoho.eu)

  • Configured priority levels (10 โ†’ 20 โ†’ 30) for redundancy

  1. DNS Records:
  • Added www as a CNAME alias

  • Set MX for mail delivery

  • Bound domain to AWS Elastic IP (so DNS wonโ€™t break after reboot)

  1. Elastic IP:
  • Allocated Elastic IP in AWS

  • Attached it to the EC2 instance to prevent IP changes

  1. SSL Certificate (Letโ€™s Encrypt + Certbot):
  • Installed certbot on the EC2 instance

  • Generated SSL certificate with certbot

  • Configured Apache to use HTTPS

What I Learned:

  • Cloudflare free plan already includes Universal SSL, but server-side SSL is s$

  • MX records define where domain mail goes, priority numbers ensure fallback or$

  • Elastic IP is essential for stable DNS pointing to AWS.

  • Certbot automates SSL certificate creation and Apache integration.

  • Real setup = domain โ†’ Cloudflare proxy โ†’ AWS server with SSL.


โœ Personal Note:
All of this was mostly for learning โ€” now my portfolio website has HTTPS.

Top comments (0)