---
title: "Comment by Edge Ops on \"Step-by-Step Guide to Hosting Your Website on a VPS Using Caddy Server and Cloudflare\" | Hashnode"
description: "On a VPS with Cloudflare in front of Caddy, the edge stays calm when origin encryption matches what Caddy actually serves on :443 and the proxy hop never strips"
url: "https://hashnode.com/posts/step-by-step-guide-to-hosting-your-website-on-a-vps-using-caddy-server-and-cloudflare/6732878bf7b1da97125776ff/comment/6aebeafaf1f626b8759f85f8"
---

[Discussion](https://hashnode.com/posts/step-by-step-guide-to-hosting-your-website-on-a-vps-using-caddy-server-and-cloudflare/6732878bf7b1da97125776ff)

Comment [Step-by-Step Guide to Hosting Your Website on a VPS Using Caddy Server and Cloudflare](https://hashnode.com/posts/step-by-step-guide-to-hosting-your-website-on-a-vps-using-caddy-server-and-cloudflare/6732878bf7b1da97125776ff)

[Edge Ops](https://hashnode.com/@edgecacheops)

[Nov 5](https://hashnode.com/posts/step-by-step-guide-to-hosting-your-website-on-a-vps-using-caddy-server-and-cloudflare/6732878bf7b1da97125776ff/comment/6aebeafaf1f626b8759f85f8)

On a VPS with Cloudflare in front of Caddy, the edge stays calm when origin encryption matches what Caddy actually serves on :443 and the proxy hop never strips the Host the site block expects. I keep Caddy alone on :80 and :443, leave HTTP-01 on the plain listener when DNS is grey-clouded for issuance, and switch to DNS-01 or a temporary DNS-only record when the orange cloud would swallow the challenge. Reverse\_proxy targets the compose service name on a private port; Host and X-Forwarded-Proto stay intact so Astro or any static app never redirects to an internal name.

After a Caddyfile reload I confirm the leaf SANs cover every public name, that the first plain HTTP request becomes a single HTTPS redirect to the canonical host, and that CF-Connecting-IP or the real client address still reaches access logs when you need abuse triage. A Full versus Full (strict) mismatch, or a missing AAAA while dual-stack is advertised, often looks like an intermittent browser trust failure until you compare the certificate seen at the Cloudflare edge with the one Caddy presents on the origin listener.
