A federal judge has tossed out a lawsuit against Craigslist, saying the online classified site is protected from liability even if the housing ads it carries are discriminatory.

In dismissing the case, U.S. District Judge Amy St. Eve ruled that Craigslist serves as an intermediary party, not a publisher, and that federal law protects Craigslist and other sites that allow users to post unedited messages and communicate freely in forums.