# Keycloak: HTTPS required

**Code:** `HTTPS required` · **Category:** Authentication · **Seen on:** Keycloak

Keycloak's realm requires SSL for external requests.

## Meaning

Keycloak's realm option 'Require SSL' defaults to external requests, so anything not from localhost or a private IP must use HTTPS. Behind a reverse proxy the original scheme is lost unless forwarded.

## Common causes

- SSL required = external
- Proxy not forwarding headers
- Testing from another machine over plain HTTP

## Quick fix

1. Use HTTPS or set SSL required to none for dev
2. Put Keycloak behind a proxy that sets X-Forwarded-Proto
3. Start with `--proxy edge` when TLS terminates at the proxy
4. Terminate TLS properly and forward `X-Forwarded-Proto`
5. For development only set Require SSL to none (master realm via CLI)

## Detailed fix by platform

### Keycloak

1. Realm settings → General → Require SSL

## How to diagnose

1. **Scheme** — HTTPS?
2. **Headers** — Forwarded?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/auth/keycloak-https-required)
