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

**Code:** `Unable to configure HTTPS endpoint` · **Category:** .NET · **Seen on:** .NET

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.

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/dotnet/unable-to-configure-https-endpoint)
