Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:14611Ḥasan > Ibn Lahīʿah > Abū al-Zubayr > Saʾalt Jābir

[Machine] I heard the Messenger of Allah ﷺ say about the frequent visits of a man to the mosque, "We had the intention to move from our houses to the city because of the proximity to the mosque. The Messenger of Allah ﷺ then forbade us from doing so and said, 'Do not make the city crowded for you have a virtue over those who live by the mosque with every step you take.'"  

أحمد:١٤٦١١حَدَّثَنَا حَسَنٌ حَدَّثَنَا ابْنُ لَهِيعَةَ حَدَّثَنَا أَبُو الزُّبَيْرِ قَالَ سَأَلْتُ جَابِرًا

أَسَمِعَ رَسُولَ اللهِ ﷺ يَقُولُ فِي كَثْرَةِ خُطَا الرَّجُلِ إِلَى الْمَسْجِدِ شَيْئًا؟ فَقَالَ هَمَمْنَا أَنْ نَنْتَقِلَ مِنْ دُورِنَا إِلَى الْمَدِينَةِ لِقُرْبِ الْمَسْجِدِ فَزَجَرَنَا رَسُولُ اللهِ ﷺ عَنْ ذَلِكَ وَقَالَ لَا تُعْرُوا الْمَدِينَةَ فَإِنَّ لَكُمْ فَضِيلَةً عَلَى مَنْ عِنْدَ الْمَسْجِدِ بِكُلِّ خُطْوَةٍدَرَجَةً