Skip to content

How to Get a Wildcard Certificate from Let's Encrypt via DNS Challenge

DodaTech Updated 2026-06-24 2 min read

Wildcard certificates from Let's Encrypt require DNS-01 challenges. This guide walks through the specific troubleshooting steps to diagnose and resolve wildcard certificate issuance via DNS challenges.

Before You Begin

Before you begin, be sure to have the following in place:

  • A Linux server with the relevant software installed
  • Access to the command line interface
  • Appropriate permissions (root or sudo)

Quick Fix

Wrong

certbot certonly --manual -d *.example.com --preferred-challenges http

Wrong: Attempting wildcard issuance with HTTP challenge (not supported)

certbot certonly --manual -d *.example.com --preferred-challenges dns

Right: Using DNS-01 challenge for wildcard certificates

Output

Saving debug log to /var/log/letsencrypt/letsencrypt.log\nPlugins selected: Authenticator manual\nObtaining a new certificate\nPerforming the following challenges:\ndns-01 challenge for example.com\nPlease deploy a DNS TXT record under:\n_acme-challenge.example.com

Prevention

To avoid future issues, follow these best practices:

  • Wildcard certs require DNS-01 challenges -- HTTP challenges do not work
  • Use DNS plugins for automated TXT record management
  • The TXT record must be _acme-challenge.example.com
  • TXT records typically take 30-300 seconds to propagate
  • Remove the TXT record after validation

DodaTech Tools

For further assistance with any of the above issues, consider using DodaTech consulting services or DodaTech tutorials for more in-depth guidance.

Common Mistakes with wildcard dns

  1. Forgetting that lazy evaluation defers computation until the value is forced, causing space leaks with unevaluated thunks
  2. Using return to exit a function early instead of wrapping a pure value in the monad
  3. Mixing let bindings with <- bindings in do notation, producing type errors

These mistakes appear frequently in real-world LETSENCRYPT code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

Why can't I use HTTP-01 for wildcard certificates?|||The HTTP-01 challenge validates a specific hostname. Wildcard certificates cover *.example.com, which includes hostnames that do not exist yet. DNS-01 validates the entire zone.
How long does DNS propagation take for Let's Encrypt challenges? Typically 30-300 seconds depending on your DNS provider and TTL settings. Use a low TTL (60 seconds) on the _acme-challenge TXT record.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro