Recording student attendance during lectures with an online system [on the network] is very necessary to assist both lecturers and the academic department in recording each student's attendance. Therefore the author will make an approach method based on face detection [face recognition] with the K-Nearest Neighbor algorithm or often called the K-NN algorithm, which is a supervised learning algorithm where the results of the new instance are classified based on the majority of the k-nearest neighbors. . The purpose of this algorithm is to classify new objects based on attributes and samples of student attendance/attendance. The k-Nearest Neighbor algorithm uses the Neighborhood Classification which will be used as the predictive value of the new instance so that it will get a value that will approximate the student's facial resemblance.