Luke 2:4-5, KJV: “4 And Joseph also went up from Galilee, out of the city of Nazareth, into Judæa, unto the city of David, which is called Bethlehem; (because he was of the house and lineage of David:) 5 to be taxed with Mary his espoused wife, being great with child.”
Yes, Joseph and Mary both made the journey to Bethlehem, but it wouldn't have been an easy path. They didn't have cars to drive, so likely Mary went by donkey (no, the Bible doesn't say she went by donkey).
It would have been a tiring journey that would have taken them several days, though now with cars, the journey would take just a couple of hours. The city of Bethlehem was named after Joseph's ancestor, the King David.
Of course, census didn't just mean showing up and being asked questions, it also was a form of tax from the Roman government.
When they get to Bethlehem, they find one small detail that probably made their journey a lot harder (but again is prophesied in the Old Testament). Find out what that is on Friday, December 17.