An upstate middle school teacher who provided students with a link to a pornographic website did not know the once-educational site now contained smut, a report said.

The male teacher, who has not been named, used Google Docs to send the link to students to help them complete their homework at Ray Middle School in Baldwinsville, syracuse.com reported.

“It was determined that one of those links was to a website that was no longer functional as an educational link and contained pornography,” said a press release from the Baldwinsville Central School District.

Students and other teachers had first filed complaints about the incident last Monday. The school district said parents were immediately notified, the paper reported in a previous article.

The teacher is on paid leave but will not face criminal charges after Onondaga County District Attorney William Fitzpatrick “found no evidence of criminal intent,” the paper reported.

The school district is providing counseling to students.

The name of the website and the number of students affected remains unknown.

“The district is reviewing all of its internet protocols and safety measures to ensure that our students remain safe,” said Superintendent Matthew McDonald in the release.

Messages and calls to Baldwinsville Central School District and Fitzpatrick were not returned to The Post by press time.