found in contempt of the state court injunction. Shortly before filing the complaint in this case, he posted a sign — which he describes as “political/religious”- — which includes the messages “IN GOD WE TRUST”; “WE PRAY FOR WORLD PEACE”; and “HELP STOP TERRORISM.” The sign also lists the phone numbers for the San Mateo County Sheriffs Department, the F.B.I. and the Red Cross, and also adds the message “Available for on site use” and a phone number. On the other side of the billboard, Maldonado posted a sign from the non-profit group Habitat for Humanity.
On July 2, 2000, Maldonado filed the instant action in the District Court for the Northern District of California. Maldonado’s complaint alleged that the Act violated the First Amendment on its face and as it had been applied to him and his various advertisements. Maldonado sought a permanent injunction restraining enforcement of the Act, including any attempts by Cal-trans to “enforce any injunction based upon” the Act.
Caltrans moved to dismiss the case on various grounds and the district court granted the motion. The district court concluded that Maldonado lacked standing to challenge the provisions of the Act dealing with permits and scenic highways, a conclusion that Maldonado does not challenge in this appeal. The district court also found that Maldonado’s constitutional challenge on the prohibition of “off-premises” commercial advertising was barred by claim preclusion. Finally, the district court found that, to the extent they were ripe for review, all of Maldonado’s claims were barred by the Rooker-Feldman doctrine.
Maldonado filed a timely notice of appeal.
II. Standard of Review
We review a district court’s dismissal of an action de novo, whether the dismissal is based on claim preclusion, ripeness or the Rooker-Feldman doctrine. Stewart v. U.S. Bancorp, 297 F.3d 953, 956 (9th Cir.2002); Ross v. Alaska, 189 F.3d 1107, 1114 (9th Cir.1999); Olson Farms, Inc. v. Barbosa, 134 F.3d 933, 936 (9th Cir.1998). We may affirm a dismissal on any basis supported by the record, even if the district court relied on different grounds or reasoning. Groten v. California, 251 F.3d 844, 851 (9th Cir.2001).
III. Discussion
A. Rooker-Feldman Doctrine
The district court found that all of Maldonado’s challenges to COAA were barred by the Rooker-Feldman doctrine.3 The basic premise of Rooker-Feldman is that “a federal district court does not have subject matter jurisdiction.to hear a direct appeal from the final judgment of a state court.” Noel v. Hall, 341 F.3d 1148, 1154 (9th Cir.2003). Rooker-Feldman recognizes the implicit statutory structure established by Congress, which has determined that the United States Supreme Court is the only federal court with jurisdiction to hear appeals from state courts. See 28 U.S.C. § 1257; Noel, 341 F.3d at 1154-55.
We recently recognized that, while the basic premise of the Rooker-Feldman doctrine is relatively simple, it has not been applied consistently in the lower federal courts. Noel, 341 F.3d at 1162-63. In Noel, we set' forth a general formulation of
3
The doctrine takes its name from Rooker v. Fidelity Trust Co., 263 U.S. 413, 44 S.Ct. 149, 68 L.Ed. 362 (1923), and D.C. Court of Appeals v. Feldman, 460 U.S. 462, 103 S.Ct. 1303, 75 L.Ed.2d 206 (1983).