"You cannot publish a private Pen as public": Private Pen publish blocked after click
0 reputation · 23 Aug 2026, 04:56 UTC
CodePen's Pen editor includes a Privacy toggle that switches a Pen between Public and Private. When a Pen is marked Private, the editor displays a warning banner indicating it is not visible to the public. Attempting to publish a private Pen as public triggers the error "You cannot publish a private Pen as public." The interface does not prevent the publish click; the action is blocked only afterward.
This behavior raises unresolved questions about the boundaries of private Pens. Documentation states private Pens should be visible only to the owner and collaborators, yet search results can still list them when indexing is enabled. Additionally, forking a private Pen via its URL produces a fork that starts as private but can be made public by the forker, effectively overriding the original privacy setting.
Should private Pens be excluded from global search results by default, or is indexing an explicit owner opt-in that overrides the privacy toggle? Should forks inherit the parent Pen's privacy setting unless explicitly changed, or is the current override behavior intentional?