Before you apply any heat, open the faucet connected to the frozen drain. As the ice melts, the water needs somewhere to go. Running water (even a trickle) helps melt the ice faster once the flow starts.
This is one of the safest methods.
If a drain is blocked by ice, sewer gases may be pushed back into the house. drain frozen