Security is one of the important aspects which is used to protect data availability from being compromised. Denial of service (DoS) attack is a common type of cyberattack and becomes serious security threats to information systems and current computer networks. DoS aims to explicit attempts that will consume and disrupt victim resources to limit access to information services by flooding a target system with a high volume of traffic, thereby preventing the availability of the resources to the legitimate users. However, several solutions were developed to overcome the DoS attack, but still suffer from limitations such as requiring additional hardware, fail to provide a unified solution and incur a high delay of detection accuracy. Therefore, the network traffic detection approach (NTDA) is proposed to detect the DoS attack in a more optimistic manner based on various scenarios. First, the high network traffic measurements and mean deviation, second scenario relied on the transmission rate per second (TPS) of the sender. The proposed algorithm NTDA was simulated using MATLAB R2020a. The performance metrics taken into consideration are false negative rate, accuracy, detection rate and true positive rate. The simulation results show that the performance parameters of proposed NTDA algorithm outperformed in DoS detection the other well-known algorithms.