Our own setup

Cloudflare in front of the public service, and nothing else

The service that hosts other people's content sits behind Cloudflare. Everything else, mail included, answers directly.

Context

The same server runs the company site, a public service where anyone can sign up and publish their own links, a finance bot and a couple of internal applications. Only one of them hosts content written by strangers, and that one takes the automated traffic, the signup attempts and the scans. Putting everything behind a proxy would have been easy and wrong: the mail runs on the same domain.

What we did

  • Only the public service name went behind Cloudflare; the rest still answers straight from the server.
  • The mail record stayed direct on purpose: a mail record behind a proxy stops delivering.
  • The decision is made per record, not per domain: the dashboard lets you get it wrong in one click, and that click costs you the mail.

Stack

  • Cloudflare
  • DNS
  • Traefik
  • Docker

Result

  • Automated traffic to the public service is filtered before it reaches the server.
  • For the most targeted name, the server address is not exposed.
  • Mail, company site and internal applications did not change at all.