I'm running a Keycloak IdP system, based on Docker compose. The goal is to use that SSO service to login into some WordPress sites that have the OpenID connect generic plugin installed. The problem is that after submitting the login form provided by Keycloak, the visitor is not redirected to the right page of the client WP site. Instead, a "page not found" message is displayed immediately. However, after hitting the back button of the browser and returning to the origin URL, you find out that the session was initiated, and the user is logged in. In other words, login succeeds but redirect fails. The URL that generates the 404 error looks like: https://sso.mydomain.com/realms/test-realm/protocol/openid-connect/a8bf9bca-ea1d-4880-a7df-abe8c8a9d9e9 I'm using Nginx proxy manager in front of my containers. This is what I've checked during troubleshooting: Client and realm settings on Keycloak are OK, including allowed redirect URIs (wildcards used to be sure) Connectivity between containers seems OK (ping, DNS resolution and so on) Logs reveal the 404 error after login, but are not useful to further diagnose the problem This is the docker-compose file for the Keycloak service: version: '3' volumes: postgres_data: driver: local services: postgres: container_name: keycloak-postgres image: postgres:latest volumes: - postgres_data:/var/lib/postgresql/data environment: POSTGRES_DB: keycloak POSTGRES_USER: keycloak POSTGRES_PASSWORD: 123456 healthcheck: test: "exit 0" keycloak: container_name: keycloak image: quay.io/keycloak/keycloak command: ["start-dev", "--http-port=8088"] environment: KC_DB: postgres KC_DB_URL_HOST: postgres KC_DB_URL_DATABASE: keycloak KC_DB_PASSWORD: 123456 KC_DB_USERNAME: keycloak KC_DB_SCHEMA: public KC_LOG_LEVEL: debug #Use "debug" for troubleshooting KEYCLOAK_ADMIN: admin KEYCLOAK_ADMIN_PASSWORD: secret KC_HTTP_PORT: 8088 # Change default port here if needed KC_HOSTNAME_STRICT: "false" KC_HOSTNAME_STRICT_HTTPS: "false" KC_HTTP_ENABLED: "true" KC_PROXY: edge #Used to make it work with Ngnix reverse proxy KC_HOSTNAME: sso.mydomain.com KEYCLOAK_FRONTEND_URL: sso.mydomain.com volumes: - ./themes:/opt/keycloak/themes ports: - 8088:8088 # Port 8080 was unavailable depends_on: postgres: condition: service_healthy Thanks for your suggestions :)