Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Islam Stack Exchange is a question and answer site for Muslims, experts in Islam, and those interested in learning more about Islam. It only takes a minute to sign up.
How do you avoid bad thoughts whilst praying
What has helped me is really focusing on what your saying, so when your reciting Quran during salah focus on each word and try understanding it, always pray in a quiet area. In shaa Allah this helps