The Bible doesn’t give any indication that he did know who they were. In the Gospel of Matthew (2:1-18) , the magi bring news of the newborn king to Jerusalem. When King Herod hears of this he is troubled and asks his chief priests and scribes where the new king is to be born. This eventually causes Herod to order the massacre of all baby boys in and around Bethlehem. (Jesus, of course, has already been taken to Egypt by Mary and Joseph, who keep him there until after Herod has died.) But nowhere in the Gospel does it indicate that Herod knew which family and which baby he was targeting.