Configure wildcard SSL certificates for automatic subdomain security with DNS-01 challenge
HTTP-01
challenge for certificate generation. This challenge is the easiest to configure and requires that the Traefik instance be accessible from the internet on port 80.
*.example.com
could protect:
api.example.com
blog.example.com
dashboard.example.com
*.subdomain.example.com
could protect:
api.subdomain.example.com
blog.subdomain.example.com
Stop the stack
Update Traefik configuration
Configure Pangolin
prefer_wildcard_cert
flag to true
in the Pangolin configuration file for your domain.blog.example.com
and blog.subdomain.example.com
, Traefik should try to request a wildcard certificate for *.example.com
and *.subdomain.example.com
automatically for you.1. HTTP Challenge Configuration
web
entrypoint for the HTTP challenge.2. Dynamic Configuration
letsencrypt
and the entrypoint to websecure
in the dynamic config.1. Configure DNS Challenge
2. Add Wildcard Domains
3. Add Environment Variables
Start the stack
Check logs
debug
in the traefik_config.yml
file.Test new resource
Verify certificate
config/letsencrypt/
) for the correct certificates. In the acme.json
file you should see something similar to the following. Note the *.
in the domain.Certificate not generating
DNS challenge failing
Old certificates still being used
acme.json
file to force new certificate generation.