{"record":{"id":"f5be485bc2de3fcc","repo":"phacility/phabricator","slug":"this-blog-is-not-visible-to-logged-out-users-so-i","errorCode":null,"errorMessage":"This blog is not visible to logged out users, so it can not be visited from a custom domain.","messagePattern":"This blog is not visible to logged out users, so it can not be visited from a custom domain\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/phame/site/PhameBlogSite.php","lineNumber":50,"sourceCode":"    if (!$this->isPhameActive()) {\n      return null;\n    }\n\n    $host = $request->getHost();\n\n    try {\n      $blog = id(new PhameBlogQuery())\n        ->setViewer(new PhabricatorUser())\n        ->withDomain($host)\n        ->needProfileImage(true)\n        ->needHeaderImage(true)\n        ->withStatuses(\n          array(\n            PhameBlog::STATUS_ACTIVE,\n          ))\n        ->executeOne();\n    } catch (PhabricatorPolicyException $ex) {\n      throw new Exception(\n        pht(\n          'This blog is not visible to logged out users, so it can not be '.\n          'visited from a custom domain.'));\n    }\n\n    if (!$blog) {\n      return null;\n    }\n\n    return id(new PhameBlogSite())->setBlog($blog);\n  }\n\n  public function new404Controller(AphrontRequest $request) {\n    return new PhameBlog404Controller();\n  }\n\n  public function getRoutingMaps() {\n    $app = PhabricatorApplication::getByClass('PhabricatorPhameApplication');","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/phame/site/PhameBlogSite.php#L32-L68","documentation":"PhameBlogSite::getSiteByDomain resolves the request Host with an anonymous (logged-out) PhabricatorUser as viewer and only ACTIVE blog statuses. If the blog at that custom domain throws PhabricatorPolicyException - its View policy is stricter than Public - the site wraps it as a plain Exception: the blog exists, but logged-out visitors can never read it, so custom-domain routing cannot proceed.","triggerScenarios":"A custom domain is bound to a Phame blog whose View Policy is 'All Users', 'Administrators', or a project policy; navigating to http://blog.example.com while not logged in; the policy was tightened after the domain was configured.","commonSituations":"Operators set up a custom domain but forget the public-visibility requirement; internal blogs accidentally given domains; SSO-gated installs where 'All Users' still blocks anonymous readers.","solutions":["Set the blog's View Policy to Public (Phame > blog > Edit Policies) so anonymous visitors can read it","Verify the blog status is Active - archived blogs do not resolve on custom domains either","Confirm the configured custom domain matches the Host header exactly (apex vs www)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before binding a custom domain, require anonymous visibility\nif ($blog->getViewPolicy() !== PhabricatorPolicies::POLICY_PUBLIC) {\n  throw new Exception('Blog view policy must be Public to serve a custom domain.');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set a Phame blog to Public view policy before configuring its custom domain","Keep the blog Active - archived blogs stop resolving","Test custom domains in a logged-out/incognito browser session"],"tags":["phabricator","phame","blog","custom-domain","policy","permissions"],"backgroundTag":"permission-denied","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}