I am flying from Hanoi to Bengaluru via Chiang Mai and DMK Bangkok. I am an Indian national. Do I need to have a transit visa for Thailand?
You need a visa, because you will have to cross Thai immigration to enter at Chiang Mai and take the domestic flight to Bangkok.
You can get a visa on arrival for a stay of up to 15 days, but to ensure that you don't have any problems at the airline and to go faster through immigration, I recommend you get an e-visa in advance from the official Thai e-visa web site.