1 Kings 8:19

Nevertheless thou shalt not build the house; but thy son that shall come forth out of thy loins, he shall build the house unto my name.

The house that David himself was forbidden to build was appointed to be built by the son who would come from his own body, and its purpose was to honor the name of the Lord God of Israel. It was therefore God's name, not David's line or Solomon's achievement, that the building was meant to exalt. Yet Solomon's later apostasy turned attention away from that divine purpose, so that the house came to be known among men as Solomon's temple. By that human naming, the honor due to God was diverted to the human builder.