331. Where did Joseph and Mary live before the birth of Jesus?

They lived in Nazareth, and traveled to Bethlehem because of a census.

And it came to pass in those days, that there went out a decree from Caesar Augustus that all the world should be taxed. And all went to be taxed, every one into his own city. And Joseph also went up from Galilee, out of the city of Nazareth, into Judaea, unto the city of David, which is called Bethlehem; (because he was of the house and lineage of David:) To be taxed with Mary his espoused wife, being great with child. And so it was, that, while they were there, the days were accomplished that she should be delivered. And she brought forth her firstborn son, and wrapped him in swaddling clothes, and laid him in a manger; because there was no room for them in the inn. Luke 2:1-7

They lived in a house in Bethlehem, and moved to Nazareth after returning from Egypt.

Jesus was born in a house in Bethlehem, where he was visited by the wise men from the east.
Now when Jesus was born in Bethlehem of Judaea in the days of Herod the king, behold, there came wise men from the east to Jerusalem, Saying, Where is he that is born King of the Jews? ... And they said unto him, in Bethlehem of Judaea . And when they were come into the house, they saw the young child with Mary his mother, and fell down, and worshipped him. Matthew 2:1-11
An angel appeared to Joseph in a dream, telling him to take Mary and Jesus to Egypt.
The angel of the Lord appeareth to Joseph in a dream, saying, Arise, and take the young child and his mother, and flee into Egypt, and ... he took the young child and his mother by night, and departed into Egypt: And was there until the death of Herod. Matthew 2:13-15
They stayed in Egypt until an angel told Joseph in a dream to return to Israel.
When Herod was dead, behold, an angel of the Lord appeareth in a dream to Joseph in Egypt, Saying, Arise, and take the young child and his mother, and go into the land of Israel And he arose, and took the young child and his mother, and came into the land of Israel. Matthew 2:13-15
So they returned to Israel, where Joseph was told by an angel in a dream to go to Nazareth.
But when he heard that Archelaus did reign in Judaea in the room of his father Herod, he was afraid to go thither: notwithstanding, being warned of God in a dream, he turned aside into the parts of Galilee: And he came and dwelt in a city called Nazareth. Matthew 2:22-23

Christian Response
Christ Created
Skeptic's Annotated Bible Answered