<span>In wireless sensor network (WSN), the high volume of observe and transmitted data among sensor nodes make it requires to maintain the security. Even though numerous secure data transmission approaches designed over a network, an inadequate resource and the complex environment cause not able to used in WSNs. Moreover, secure data communication is a big challenging problem in WSNs especially for the military application. This paper proposes a dingo algorithm-based forwarder selection and huffman coding (DAHC) to improve authentication in internet of things (IoT) WSN. Initially, it detects the anomalous nodes by applying support vector machine (SVM) algorithm based on sensor node energy, node selfishness, and signal to noise ratio (SNR). Next, we using the dingo algorithm to select the forwarder node. This dingo algorithm computes the fitness function based on node degreee, node distance and node energy. Finally, the huffman coding to provide end to end authentication established on node energy from sender to receiver. During data transmission, the huffman coding to build the binary hop count value, it improves the authentication in the WSN. Performance results specify that this approach enhances the detection ratio and throughput.</span>