It was narrated from 'Abdullah bin Mughaffal that the Prophet (ﷺ) said: “Whoever digs a well, is entitled to forty forearms' length surrounding it is as a resting place for his flocks.”
It was narrated from Abu Sa'eed Al-Khudri that the Messenger of Allah (ﷺ) said: “The land around a well (that is considered to be part of it) is the length of the well rope (in all directions).”