# Traefik not generating a certificate

**URL:** <https://community.traefik.io/t/traefik-not-generating-a-certificate/5072>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [March 23, 2020, 3:31pm UTC](https://community.traefik.io/t/traefik-not-generating-a-certificate/5072 "2020-03-23T15:31:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunoamaral](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/brunoamaral/32/917_2.png) [@brunoamaral](https://community.traefik.io/u/brunoamaral)\
**Post date:** [March 23, 2020, 3:31pm UTC](https://community.traefik.io/t/traefik-not-generating-a-certificate/5072/1 "2020-03-23T15:31:57Z")

</div>

I'm using the same configuration in two domains, both using cloudflare and dns authentication, yet one of them does not have a valid certificate.

Here's what the error log shows:

```auto
time="2020-03-23T08:54:51Z" level=info msg="Enabling ProxyProtocol for trusted IPs []" entryPointName=https
time="2020-03-23T08:54:51Z" level=info msg="Starting provider aggregator.ProviderAggregator {}"
time="2020-03-23T08:54:51Z" level=info msg="Starting provider *file.Provider {\"directory\":\"config/\",\"watch\":true}"
time="2020-03-23T08:54:52Z" level=info msg="Starting provider *docker.Provider {\"watch\":true,\"endpoint\":\"unix:///var/run/docker.sock\",\"defaultRule\":\"Host(`DOMAIN.TLD`) \\u0026\\u0026 PathPrefix(`/{{ trimSuffix \\\"-settings\\\" .Name }}`)\",\"exposedByDefault\":true,\"network\":\"traefik_proxy\",\"swarmModeRefreshSeconds\":15000000000}"
time="2020-03-23T08:54:52Z" level=info msg="Starting provider *acme.Provider {\"email\":\"johnny@brunoamaral.eu\",\"caServer\":\"https://acme-v02.api.letsencrypt.org/directory\",\"storage\":\"acme.json\",\"keyType\":\"RSA4096\",\"dnsChallenge\":{\"provider\":\"cloudflare\"},\"httpChallenge\":{\"entryPoint\":\"http\"},\"ResolverName\":\"default\",\"store\":{},\"ChallengeStore\":{}}"
time="2020-03-23T08:54:52Z" level=info msg="Testing certificate renew..." providerName=default.acme
time="2020-03-23T08:54:52Z" level=info msg="Starting provider *traefik.Provider {}"

```

The difference is that the first domain is configured in a file and the other through the docker-compose labels.

```yaml
labels:
  - traefik.enable=true
  - "traefik.http.routers.heimdall.rule=Host(`${DOMAIN_NAME_2}`)||Host(`www.${DOMAIN_NAME_2}`)"
  - "traefik.http.routers.heimdall.tls=true"
  - "traefik.http.services.heimdall.loadbalancer.server.port=8000"

```

I'm at a loss here, any idea of what I am missing? Where should I go to further investigate?
