´Abu Umamah bin Sahl bin Hunaif said:` "My father said: 'The Messenger of Allah (ﷺ) said: 'Whoever goes out to his Masjid - the Masjid of Quba' and prays therein, that will be equivalent to 'Umrah.'"
Related hadith on this topic
Explanation & Benefits
Hafiz Muhammad Ameen
700. Commentary: It is not permissible to travel from afar with the intention of seeking nearness or blessing (tabarruk) by visiting Masjid Quba, because this distinction is reserved only for the three mosques (Baytullah, the Prophet’s Mosque, and Masjid al-Aqsa). However, coming to Masjid Quba from nearby areas is a cause of virtue; that is, a person who has come to Madinah Munawwarah with the intention of visiting the Prophet’s Mosque, or who is a resident of Madinah Munawwarah, should go to Masjid Quba so that he may attain this virtue. In this way, all the ahadith will be acted upon. And Allah knows best.
Source: Sunan Nasa'i: Translation and Benefits by Shaykh Hafiz Muhammad Amin Hafizullah, Page: 700