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. See why the flag didn't match
- Open the person's profile > Feature flags tab
- Read the match evaluation column for the flag
2. Stop the flicker
- Bootstrap flag values in posthog.init() from your server
- Or hide the element until posthog.onFeatureFlags() fires
- In React, use the useFeatureFlagEnabled hook
3. Identify before evaluating
- Call posthog.identify() as soon as the user is known, before reading flags
- If a property was just set, pass it via setPersonPropertiesForFlags() or in the getFeatureFlag() call
4. Fix blocked or local evaluation cases
- Set flags_api_host to a proxied host or use a reverse proxy
- 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
- PostHog Events Not Showing Up
- PostHog Blocked by Ad Blockers
- PostHog Session Replay Not Recording
- PostHog Replay Broken: Missing CSS, Fonts or Blank Screen
- PostHog Bill Too High
- PostHog Pageviews Missing or Duplicated in Next.js
- PostHog Numbers Different From Google Analytics
- PostHog Identify Merging Wrong Users
- PostHog Surveys Not Showing
- PostHog Toolbar or Heatmaps Not Loading
- Why Is PostHog So Slow?
- PostHog Not Capturing Events in Playwright or Puppeteer Tests