Android IOException: Cleartext HTTP traffic to <host> not permitted

Android 9+ (API 28+) blocks plaintext `http://` connections by default.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Android IOException Platform: Mobile
Common Root Causes:
  • Android 9+ (API 28+) blocks plaintext `http://` connections by default.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Use HTTPS for all endpoints; allow cleartext strictly for local debug domains in `network_security_config.xml`.
Safe Diagnostic Command:
Check AndroidManifest.xml & network_security_config.xml
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Android 9+ (API 28+) blocks plaintext `http://` connections by default. Recommended diagnostic: `Check AndroidManifest.xml & network_security_config.xml`. Remediation: Use HTTPS for all endpoints; allow cleartext strictly for local debug domains in `network_security_config.xml`.

Worked Examples

  • Run `Check AndroidManifest.xml & network_security_config.xml` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-android-cleartext-http-not-permitted · Independently verified: 2026-11-25

Related Resources