It sure is; here's a video demonstrating the effectiveness. Shutting your door can mean the difference between life and death. I encourage anyone to watch or re-watch this, just to hammer it home.
Unfortunately, my cats can't deal with shut doors, so if there's ever a fire in my apartment, at least we'll all go together 🙃
Using thermal imaging cameras, researchers found that closed-door rooms on both floors during the fire’s spread had average temperatures of less than 100 degrees Fahrenheit versus 1000+ degrees in the open-door rooms. “You could see a markable difference that a person could be alive in a room with a closed door much longer,” says Kerber.
Gas concentrations were markedly different as well. The open-door bedroom measured an extremely toxic 10,000 PPM CO (parts per million of Carbon Monoxide), while the closed had approximately 100 PPM CO.
In that case, keeping the doors and windows shut will give you the best chance of survival, because there will be less oxygen flow and thus a slower burn.
You’ll need to call in a fire emergency, lie low on the ground, and try to use a rag/shirt/towel to filter some of the smoke while you wait to be rescued. You still might die, but at least this way you have a chance.