Attack and king safety
A defender behind the pawn shield
Before moving a rook across your own back rank, check whether it will occupy the square your king needs to escape. Compare a higher defensive rank.
Worked example
Position in text
White to move. White: pawn f2, pawn g2, pawn h2, rook a1, king g1. Black: king g8, bishop d6, queen h4.
FEN: 6k1/8/3b4/8/7q/8/5PPP/R5K1 w - - 0 1
Black threatens ...Qxh2+, with the queen protected by the bishop on d6. After 1.Ra3, White can transfer later along rank three where safe. More immediately, 1...Qxh2+ 2.Kf1 is legal because the rook did not occupy f1. This merely avoids mate now; it does not prove the rook move is best.
A plausible mistake
A rook on your back rank looks defensive, but if it fills the only flight square it may create a mate rather than stop one.
Try it yourself
Position in text
Black to move. White: pawn f2, pawn g2, pawn h2, rook f1, king g1. Black: king g8, bishop d6, queen h4.
FEN: 6k1/8/3b4/8/7q/8/5PPP/5RK1 b - - 1 1
White instead placed 1.Rf1. Does the rook now have a way to answer 1...Qxh2+? Test every escape.
Check your answer
1...Qxh2# is mate. The queen covers h1 and g1; the bishop on d6 guards h2, White’s own pawns fill f2 and g2, and the rook occupies f1. It cannot capture the queen or block an adjacent diagonal check.