A method for automatically connecting to a wireless local area network, WLAN, wherein the method comprises: automatically detecting, by a terminal, whether a wireless signal of the WLAN exists when receiving a WLAN connection request triggered by a user through an application; comparing, by the terminal, information of the WLAN corresponding to the wireless signal with information of a prestored WLAN when detecting the wireless signal of the WLAN, safety verification information of the prestored WLAN being correspondingly stored in an application server, a type of the application server corresponding to a type of the application triggering the WLAN connection request; sending, by the terminal, a safety verification information acquisition request to a wireless device corresponding to the WLAN when the information of the WLAN matches the information of the prestored WLAN, the safety verification information acquisition request comprising application server information, the application server information comprises an identity of the application server; acquiring, by the wireless device, safety verification information corresponding to the WLAN from the application server when receiving the safety verification information acquisition request, and sending the safety verification information to the terminal, wherein the safety verification information is an encrypted password; and decrypting, by the terminal, the safety verification information to obtain the decrypted safety verification information, performing safety verification on the WLAN according to the decrypted safety verification information, and accessing a network after the safety verification is passed. automatically detecting, by a terminal, whether a wireless signal of the WLAN exists when receiving a WLAN connection request triggered by a user through an application; comparing, by the terminal, information of the WLAN corresponding to the wireless signal with information of a prestored WLAN when detecting the wireless signal of the WLAN, safety verification information of the prestored WLAN being correspondingly stored in an application server, a type of the application server corresponding to a type of the application triggering the WLAN connection request; sending, by the terminal, a safety verification information acquisition request to a wireless device corresponding to the WLAN when the information of the WLAN matches the information of the prestored WLAN, the safety verification information acquisition request comprising application server information, the application server information comprises an identity of the application server; acquiring, by the wireless device, safety verification information corresponding to the WLAN from the application server when receiving the safety verification information acquisition request, and sending the safety verification information to the terminal, wherein the safety verification information is an encrypted password; and decrypting, by the terminal, the safety verification information to obtain the decrypted safety verification information, performing safety verification on the WLAN according to the decrypted safety verification information, and accessing a network after the safety verification is passed.