Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:19:7

˹He was told˺, "O Zechariah, indeed We give you good tidings of a boy whose name will be John. We have not assigned to any before ˹this˺ name."  

God, exalted be He, in responding to his request for a son that will be the incarnation of His mercy, says: ‘O Zachariah! Indeed We give you good tidings of a boy, who will inherit in the way that you have requested — whose name is John. Never before have We made anyone his namesake’, that is, ˹never has there been˺ anyone with the name ‘John’.
القرآن:١٩:٧

يَا زَكَرِيَّا إِنَّا نُبَشِّرُكَ بِغُلَامٍ اسْمُهُ يَحْيَىٰ لَمْ نَجْعَلْ لَهُ مِنْ قَبْلُ سَمِيًّا  

{يا زكريا إنا نبشرك بغلامِ} يَرثُ كما سألت {اسمه يحيى لم نجعل له من قبل سميا} أي: مسمى بيحيى.