The present study aims to investigate the impact of texting and web surfing on the driving behavior and safety of young drivers on rural roads. For this purpose, driving data were gathered through a driving simulator experiment with 37 young drivers. Additionally, a survey was conducted to collect their demographic characteristics and driving behavior preferences. During the experiment, the drivers were distracted using contemporary smartphone internet applications i.e., Facebook Messenger, Facebook and Google Maps. Regression analysis models were developed in order to identify and investigate the effect of distraction on accident probability, speed deviation, headway distance, as well as lateral distance deviation. Additionally, random forest (RF), a machine learning classification algorithm, was deployed for real-time distraction prediction. It was revealed that distraction due to web surfing and texting leads to a statistically significant increase in accident probability, headway distance and lateral distance deviation by 32%, 27% and 6%, respectively. Moreover, the driving speed deviation was reduced by 47% during distraction. Apart from the real-time prediction, the RF revealed that headway distance, lateral distance, and traffic volume were important features. The RF outcomes revealed consistency with regression analysis and drivers during the distractive task are more defensive by driving at the edge of the road near the hard shoulder and maintaining longer headways. Overall, driving behavior and safety among young drivers were both significantly affected by the investigated internet applications.