Judge John Cleland's order also applies to any law enforcement investigator who has worked on the case and anyone acting on behalf of the lawyers.
The off-limit topics include evidence; opinions about Sandusky's guilt or innocence or about the merits of legal and factual matters under discussion; and "the reputation, character, credibility or criminal record of the defendant or any witness, prospective witness or organization which is or may testify at trial, or be the subject of trial testimony or evidence."
He directed the lawyers to "make reasonable efforts" to limit statements by witnesses or the witnesses' lawyers and to be able to prove they have taken those steps.
Cleland said he was acting to help ensure a "fair, impartial and orderly trial" for Sandusky, a proceeding scheduled to begin June 5 in Bellefonte.
Sandusky, 68, is charged with sexually abusing 10 boys over 15 years, and authorities say some of the abuse happened on Penn State's campus. Sandusky has maintained his innocence on the 52 counts against him.
The ensuing scandal led to the firing of legendary football coach Joe Paterno and the ouster of the university president.
Sandusky attorney Karl Rominger said he was studying the order.
"Having never been gagged by a court before, I will need to research the law and First Amendment issues," Rominger said in an email. "I'm pretty sure the court has the authority to limit press contacts, I just don't know what the law says about the scope and nature of such limits. Since the order does affect the media as well, I'll be curious to see if any press outlets appeal it."
A spokesman for the attorney general's office declined to comment.
Cleland said his order applies to comments that could reasonably be expected to be disseminated and to comments made on background or without attribution.
Lawyers on both sides have been speaking to banks of cameras and reporters after pretrial hearings at the Centre County Courthouse, a practice that is certain to be limited, if not ended outright, by the judge's order.
After a brief hearing on April 5, prosecutor Joe McGettigan was critical of the defense's tactics and responded to a defense claim that the charges lack specificity by telling reporters that Sandusky had been "provided with voluminous documentation of perversions against young children."
Cleland's order wasn't accompanied by any decisions regarding the defense motions that were the topic of last week's hearing, but the judge previously said he would decide on them this week.
Cleland wrote that the order was "narrowly tailored to achieve its purposes in light of the unprecedented publicity generated by the case" and that he will "broadly construe this order to assure that its purposes are achieved."
He also warned lawyers to comply with professional conduct rules regarding pretrial publicity, the special responsibilities of prosecutors and the state court system's code of civility.
Also awaiting trial are Gary Schultz and Tim Curley, Penn State administrators accused of lying to the grand jury investigating Sandusky and failing to properly report suspected child abuse. A Dauphin County judge on April 5 issued an order that set deadlines for various defense and prosecution filings, including catch-all defense motions by July 30, as well as a June 1 status conference on the case at a Harrisburg courthouse.
Curley, the school's athletic director, is on leave. Schultz, the former vice president for business and finance, has retired. Both have repeatedly denied the allegations.