Unable to configure HTTPS endpoint 🟪 .NET

Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date

Kestrel was told to listen on HTTPS but has no certificate — the ASP.NET Core dev certificate is missing/expired, or production didn’t configure one.

Seen on: .NET

Meaning

In development run dotnet dev-certs https --trust. In containers/production, either terminate TLS at a proxy and listen on HTTP, or configure a certificate (Kestrel:Certificates or ASPNETCORE_Kestrel__Certificates__Default__Path).

Common causes

  • Dev certificate not created/trusted or expired
  • Docker container with https URLs but no certificate
  • Production config expecting a certificate path that doesn’t exist

⚡ Quick fix

  1. dotnet dev-certs https --clean && dotnet dev-certs https --trust
  2. In containers listen on http (ASPNETCORE_URLS=http://+:8080) behind a proxy
  3. Mount and configure a certificate for Kestrel

Detailed fix by platform

Shell

  1. csharp
    dotnet dev-certs https --clean
    dotnet dev-certs https --trust
    export ASPNETCORE_URLS=http://+:8080

How to diagnose

  1. URLs — ASPNETCORE_URLS / launchSettings
  2. Cert — dev-certs check
  3. Environment — Dev or container?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.