Sunan Abi Dawud Book 2, Hadith 66
After (praising Allah and blessing the Prophet) that: The Messenger of Allah (ﷺ) used to command us to build mosques in our localities and keep them well and clean.
The Messenger of Allah (ﷺ) commanded us to build mosques in different localities (i.e. in the locality of each tribe separately) and that they should be kept clean and be perfumed.
I said: Messenger of Allah, tell us the legal injunction about (visiting) Bayt al-Muqaddas (the dome of the Rock at Jerusalem). The Messenger of Allah (ﷺ) said: go and pray there. All the cities at that time were effected by war. If you cannot visit it and pray there, then send some oil to be used in the lamps.