SummaryIn this article, blockchain‐enabled hybrid Red Fox optimization and arithmetic optimization approach‐based cluster head selection along Hazelnut tree search algorithm (HTSA)‐based optimal trust path selection is proposed to secure data transmission at wireless sensor network. The proposed BC‐Hyb‐RF‐AOA‐HTSA‐WSN method consists of two phases: (i) to find optimum cluster head (CH) and (ii) to find optimal trust path. Firstly, hybrid Red Fox optimization approach and arithmetic optimization algorithm are employed to select cluster head accurately. After CH selection, HTSA is used to find trust route from several routes, which is finalized optimally with the joint trust that depends on trust parameters. Finally, blockchain is provided with optimized, carefully chosen trust routes for communication. The proposed BC‐Hyb‐RF‐AOA‐HTSA‐WSN method is activated in NS2 tool. The proposed technique achieves lesser delays of 98.38%, 92.34%, and 97.45%, better delivery ratios of 89.34%, 83.12%, and 88.96%, and lower packet drops of 91.25%, 79.90%, and 92.88% compared with the existing techniques, such as BC‐FA‐ROA‐WSN, BC‐RDA‐WSN, and BC‐HRDSS‐WSN.