Q: How long does a woman has to remain indoors after giving birth c section or normal birth?
A.There is no law that she has to remain indoors for a certain amount of days after giving birth, whether caesarean section or normal birth.
There is a superstition among people that after birth a woman has to remain indoors for forty days. This is not a law of Islam. The forty day period is the maximum flow of blood after birth that a woman can experience, according to the Hanafi math-hab. Sometimes the blood can stop before forty days. Even during this period the woman is allowed to come out of the hone if need be. Obviously a female should only come out of her home when there is an urgent or pressing need.
Mufti Siraj Desai