Read this passage and open each verse for the full verse feed and commentary tools.
16Since the day that I brought forth my people Israel out of Egypt, I chose no city out of all the tribes of Israel to build a house, that my name might be there; but I chose David to be over my people Israel. 17Now it was in the heart of David my father to build a house for the name of Yahweh, the God of Israel. 18But Yahweh said to David my father, Whereas it was in your heart to build a house for my name, you did well that it was in your heart: 19nevertheless you shall not build the house; but your son who shall come forth out of your loins, he shall build the house for my name. 20Yahweh has established his word that he spoke; for I am risen up in the room of David my father, and sit on the throne of Israel, as Yahweh promised, and have built the house for the name of Yahweh, the God of Israel.
1 Kings 8:16-20 (WEB)