Not always:
Penalty: For intentional grounding:
loss of down and 10 yards from the previous spot; or
loss of down at the spot of the foul; or
if the passer is in his end zone when the ball is thrown, it is a safety. See 4-7 for actions to conserve time inside one minute of either half.
Note: If the foul occurs less than 10 yards behind the line of scrimmage, but more than half the distance to the goal line, the ball is to be placed at the spot of the pass.