Praise be to Allah.
The one who is tested with waswas about taharah (state of purity) or anything else should pay no attention to it; he should remain certain that his taharah is still valid and should not change his mind concerning that because of mere doubt.
It was narrated that ‘Abdullah ibn Zayd (may Allah be pleased with him) said: A man complained to the Prophet (blessings and peace of Allah be upon him) that he felt something whilst praying -- should he stop his prayer? He said: “No, not unless you hear a sound or notice a smell.”Narrated by al-Bukhari, 2056; Muslim, 361
Al-Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
This hadeeth (prophetic tradition) in which the Messenger of Allah (blessings and peace of Allah be upon him) issued a ruling is regarded as an important shar‘i (legal) principle, which is that certainty cannot be dispelled by doubt, and things remain as they are. So long as the taharah is certain, then it cannot be changed by mere doubt. So long as the state of purity remains valid then it is to be regarded as valid until it is proven that it has been invalidated. This hadeeth offers ease and reassurance to the individual, as it keeps him far away from waswas and doubts, because by means of this hadeeth doubt is dispelled and what he is certain about remains, namely taharah. End quote.
Fatawa Noor ‘ala ad-Darb, 56/119
Al-Shaykh Ibn Baz (may Allah have mercy on him) said:
The believer should not pay any attention to this waswas, because that encourages the Shaytan to mess about with him. The Shaytan is keen to spoil the good deeds of the sons of Adam, prayer and other things. So what is required is to beware of his tricks and whispers, and to put your trust in Allah and regard what may happen to one of whispers as being from the Shaytan, so that you will not pay any attention to them. If something comes out for certain, without any doubt, then istinja (cleaning oneself after relieving oneself) and wudu should be repeated. But so long as there is any doubt, even if it is small, then you should not pay any attention to it so as to regard the taharah as still valid and combat the Shaytan. End quote. Majmoo‘ Fatawa Ibn Baz, 10/123
With regard to the words of Ibn al-Mubarak, Abu ‘Eesa at-Tirmidhi (may Allah have mercy on him) said in his Jami‘ (1/127):
‘Abdullah ibn al-Mubarak said: If a person is uncertain as to whether he has nullified his wudu, then he does not have to do wudu until he is so certain of it that he could swear to it. End quote.
This is an explanation of what is stated above, which is that no attention should be paid to doubts no matter how strong they are, until one is certain of that.
And Allah knows best.