The short answer

Castling moves your king and one rook in a single turn. Check the history of those two pieces, the empty spaces between them, and the king’s entire route.

Castling is the one ordinary chess move that moves two of your pieces. It often carries the king away from the centre while bringing a rook closer to the action. That makes it useful, but it is a choice rather than a requirement. Some positions reward early castling; others call for waiting or keeping the king in the centre.

The rule becomes much easier when you separate three questions. Have this king and rook kept their castling rights? Is the route clear? Is the king safe on every square it uses? Answer them in that order. The examples here describe standard chess, rather than the different starting arrangements used in Chess960.

Where the king and rook finish

Find the king’s starting square first. White starts on e1 and Black on e8. For kingside castling, move the king two squares towards the h-file. The rook then moves from the corner to the square immediately beside the king on the other side. For queenside castling, use the a-file rook instead. The king still moves exactly two squares, even though the rook travels farther.

“Kingside” and “queenside” name the sides of the original setup. They do not change when a queen moves, a board is rotated, or you play Black. If you are unsure on a rotated board, use the square names rather than guessing from your screen’s left and right edges.

MoveKingRook
White kingsidee1 to g1h1 to f1
White queensidee1 to c1a1 to d1
Black kingsidee8 to g8h8 to f8
Black queensidee8 to c8a8 to d8

Castling rights depend on history

An unmoved king and an unmoved original rook are the starting requirement. If your king has left its starting square, moving it back does not restore either castling option. If one rook moves and returns, you lose castling with that rook, but may still castle with the other eligible rook. A move made only to escape an attack still counts as a move.

This is why a photograph of a board may not tell the whole story. The pieces can appear to be in their starting places even after their castling rights have disappeared. A proper saved position records those rights separately. A rook created by promotion does not inherit the missing original rook’s right to castle.

Clear every intervening square

For White to castle kingside, f1 and g1 must be empty. For White to castle queenside, b1, c1 and d1 must all be empty. Use the equivalent eighth-rank squares for Black. Neither your own pieces nor opposing pieces may occupy these spaces: castling does not capture anything and cannot jump over a piece.

The b-file square is a common source of mistakes. White’s king never lands on b1, but the queenside rook must pass through it, so a knight still on b1 prevents the move. Moving the bishop and queen is not enough if that knight remains. Once the obstruction moves, castling may become available again, provided the other conditions still hold.

Check all three king squares

For White kingside, inspect e1, f1 and g1. For White queenside, inspect e1, d1 and c1. Black uses the same files on rank eight. An enemy attack on any of those three squares prevents that castling move. The final square being safe is not enough: the king is not allowed a brief trip through danger.

Check pawn attacks carefully. A pawn attacks diagonally even when its forward move points somewhere else. Also, a pinned enemy piece still attacks squares for the purpose of king safety. Do not decide that a transit square is safe merely because the attacking piece would expose its own king by moving there.

Instructional diagramWhite to move
White cannot castle kingside: the black rook attacks f1, the king’s transit square. White is not currently in check.

The rook and the b-file can be attacked

The special safety restriction protects the king’s route, not every square used by the rook. An attacked rook may still take part in castling. Likewise, queenside castling may be legal when b1 or b8 is attacked, because the king does not cross that square. Empty and unattacked are different tests; b1 must pass the first, but not the second.

In the position below, Black’s rook looks down the b-file. White’s b1 square is empty, and e1, d1 and c1 are safe. White can therefore castle queenside. Move the same attacking rook to d8 with an open d-file and the answer changes: d1 would be attacked, directly interrupting the king’s route.

Instructional diagramWhite to move
Queenside castling is legal for White despite the attack on b1. The king uses e1, d1 and c1.

Recognise the notation and make one move

Kingside castling is written O-O, and queenside castling O-O-O. These are letters O in standard algebraic notation. They describe one move, not a king move followed by a separate rook move. After White castles, it is Black’s turn immediately. The rook’s longer journey on the queenside does not cost an extra turn.

Over a physical board, move the king first and then the rook as part of the same move, using one hand. On a screen, follow that platform’s input method; interfaces differ. If castling is unavailable, inspect rights, obstructions and attacked squares before assuming a fault. In a tournament dispute, ask the arbiter rather than rearranging the position by agreement.

A legal castle is not automatically a good castle

Once legality is settled, look at the position you will actually reach. Is the king moving behind a useful pawn shelter, or towards open files and attacking pieces? Will your rook gain a useful file? Has your opponent already aimed an attack at that wing? Castling often helps development, but the rule does not promise safety.

A useful beginner exercise is to predict both resulting piece squares before moving anything. Then name one benefit and one possible danger. This builds an understanding of the move’s purpose without turning “castle early” into an instruction that must be followed regardless of the board.

A little extra clarity

Common questions

Can I castle out of check?

No. First answer the check with a different legal move. If the king itself moves to escape, its castling rights are then gone permanently.

Can I castle after previously being in check?

Yes, if the king and relevant rook never moved and all current conditions are satisfied. A past check alone does not remove castling rights.

Can I castle if the rook is attacked?

Yes. The rook may be attacked; the king’s starting square, transit square and destination must be safe. All intervening squares must still be empty.

Does queenside castling move the king three squares?

No. White’s king goes from e1 to c1 and Black’s from e8 to c8. The rook makes the longer journey.

Can castling give check?

Yes. The rook’s new position can open an attack on the opposing king. That does not change the requirements for your own king’s safety.

Sources and further reading

Official rules and the references used for this guide.

Written by the Theme Chess team. Explanations help you learn; the linked rules remain the reference for formal play.