PostHog Feature Flags Not Working or Undefined

Workaround available Web, server SDKs, mobile Updated October 21, 2026

Quick answer

Flags read as undefined or false on first render because they load asynchronously (about 100-500 ms). Bootstrap flags or wait for onFeatureFlags, call identify() before evaluating, and proxy flag requests past ad blockers.

Most likely fix: See why the flag didn't match.

Symptoms

Flag returns undefined, None or false for users who should match; UI flickers from the old to the new variant on page load.

Why it happens

  • Flags evaluated before the /flags request completes
  • identify() called after evaluation, so the anonymous user is evaluated
  • Ad blocker blocking flag requests
  • Flag disabled, not rolled out or wrong release conditions
  • Local evaluation missing person properties required by the condition
  • advanced_disable_feature_flags set in config

How to fix it

Try these in order — the most common fix is first.

  1. 1. See why the flag didn't match

    1. Open the person's profile > Feature flags tab
    2. Read the match evaluation column for the flag
  2. 2. Stop the flicker

    1. Bootstrap flag values in posthog.init() from your server
    2. Or hide the element until posthog.onFeatureFlags() fires
    3. In React, use the useFeatureFlagEnabled hook
  3. 3. Identify before evaluating

    1. Call posthog.identify() as soon as the user is known, before reading flags
    2. If a property was just set, pass it via setPersonPropertiesForFlags() or in the getFeatureFlag() call
  4. 4. Fix blocked or local evaluation cases

    1. Set flags_api_host to a proxied host or use a reverse proxy
    2. For server-side local evaluation, pass the person and group properties the condition needs, or simplify the condition

This guide also covers

  • posthog feature flag undefined
  • posthog feature flags not working
  • posthog feature flag flicker
  • posthog flag returns false
  • posthog bootstrap flags

Still not working?

If PostHog keeps failing, you're not alone. See every PostHog problem users report or the alternatives people switch to.

Other PostHog errors