How do I configure Traefik to use the DNS challenge with Cloudflare?

Responsive Ad Header

Question

Grade: Education Subject: Support
How do I configure Traefik to use the DNS challenge with Cloudflare?
Asked by:
68 Viewed 68 Answers

Answer (68)

Best Answer
(565)
To configure Traefik for the DNS challenge, you'll need to include the `providers.traefik.http.routers.rule` section in your Traefik configuration file (e.g., `traefik.yml`). This section specifies the rules for routing traffic and should include `entryPoints`, `middlewares`, and `providers` settings. The `middlewares` section will contain the `cloudflare-dnschallenge` middleware, which handles the DNS challenge process. You'll also need to ensure your DNS provider allows TXT record creation and that Cloudflare is properly configured to verify the challenge.