Reference: Silsilah Fataawa Noor ‘alad-Darb – Tape 11
Question: Some people – [and] may Allaah guide them – when they pass by others who are seated or passing them, they nod their head towards them – intending [by doing so] to extend the greeting [of as-salaam ‘alaykum]; [so] should we respond to them [when they do this]?
Response: It is not obligatory to respond to the likes of this [greeting]; rather, it is [only] obligatory to respond to the one who [verbally] extends the legislated greeting, and that is by saying ‘as-salaam ‘alaykum’. This is what is obligatory [upon the Muslim] to respond to.
As for him who only nods with his head or only [raises] his hand, then he is not deserving of a response. That is because [his action] is contrary to what has been legislated. However, in this situation, it is befitting you explain to him the [correct and] legislated greeting is to say ‘as-salaam ‘alaykum’, just so he does not feel uncomfortable [about you not responding] and there be no hostility [between the two of you], and also that he benefits from this advice about the legislated [manner of] greeting.
And this is also [the advice which should be directed] to the one who greets you by saying ‘ahlan wa sahlan wa marhaban’, because this is [also] not the [correct and] legislated greeting; rather, the legislated greeting is [to say] ‘as-salaam ‘alaykum’, and the Muslim is [then] to respond to him by saying ‘wa ‘alaykum as-salaam’.