Traefik 2.0 — Wildcard Let’s Encrypt Certificates

containeroo
2 min readNov 12, 2019
Source: https://letsencrypt.org/images/le-logo-wide.png

Introduction

In this tutorial we will setup Traefik to obtain wildcard certificates from Let’s Encrypt. This requires DNS challenge to be setup. Usually Traefik obtains a certificate for every subdomain. We can simplify this process by telling Traefik to use a wildcard (*.example.com) certificate instead.

Prerequisites

  • Registered Domain
  • Authoritative DNS Servers from one of these providers (you may need to change your DNS servers of your domain to one of the provider in the list)

In this tutorial we will use Cloudflare as our DNS servers for our domain.

Setup DNS challenge

If you have followed our other guides, chances are you currently use HTTP challenge. These types of challenges define how Let’s Encrypt assures that you are the owner of the domain you want to obtain a certificate for.

In order to get a wildcard certificate, you have to use DNS challenge.

First of all make sure you connect your domain with one of the supported DNS providers. I’m using Cloudflare. This depends on where you bought your domain, so I can’t show you exactly how to do it.

--

--