Lesson of the day for Yale undergrads: Forget that sexy archaeology professor — teachers can’t date you anymore.

The university has banned sexual relationships between professors and undergraduates — and not just those they’re teaching or may teach in the future, according to alumni magazine Light and Variety.

The new rule has been a long time coming — Deputy Provost Charles Long had been pushing for them since 1983.

Some faculty-student romances turn out fine, Long said, but others can be “destructive” to students.

Before this year, faculty members at the Ivy League school were forbidden only from sexual relationships with students over whom they had “direct pedagogical or supervisory responsibilities.” Once a student graduates or begins graduate studies, all bets are off.

The news hardly caused a ripple among the student body.

“People were more surprised than anything,” said Paul Needham, editor in chief of the Yale Daily News. “This isn’t an issue that comes up every day.”