Rules & practice · 4 min read
Castling rules in chess: a guide with examples
Castling is a useful move to learn early because it often helps you bring your king to safety while getting a rook into play. It’s also the only move in standard chess that moves two of your pieces at once. This guide covers the castling rules, where each piece goes, and the situations that can prevent you from castling.
The quick answer
To castle in standard chess, move your king two squares toward a rook, then place that rook on the square the king crossed. Neither piece may have moved earlier, the space between them must be clear, and the king cannot start in, pass through, or finish in check.
Kingside and queenside castling squares
You can castle toward either rook, provided the conditions are met on that side. Kingside castling is written O-O, while queenside castling is written O-O-O.
| Side | White king | White rook | Black king | Black rook |
|---|---|---|---|---|
| Kingside, O-O | e1 → g1 | h1 → f1 | e8 → g8 | h8 → f8 |
| Queenside, O-O-O | e1 → c1 | a1 → d1 | e8 → c8 | a8 → d8 |
These destinations apply to standard chess. Chess960 uses different starting arrangements and has its own castling details.
When you’re playing over the board, move the king first, then the rook, using the same hand. Starting with the rook can commit you to an ordinary rook move under the touch-move rules. You’ll find the official wording in FIDE articles 3.8 and 4.4.
Follow the king and rook on the board
The example below leaves most pieces off the board so you can follow the movement clearly. White has kept both castling rights, and the route between the king and either rook is clear.
Select “After castling” to see White castle kingside. The king moves from e1 to g1, the rook on h1 moves to f1, and the rook on a1 stays where it was. Although two pieces have moved, this counts as one turn, so Black plays next.
Why can’t I castle in this position?
When castling isn’t available, working through this checklist usually explains why:
- Has your king moved earlier in the game? Returning it to its starting square doesn’t restore castling rights.
- Has the rook on that side moved? You can’t castle with a rook that has already moved.
- Is a piece still between the king and rook? The path needs to be completely clear.
- Is your king in check, or is either square it must cross or land on attacked? The king’s whole route needs to be safe.
Chess.com’s castling reference illustrates these restrictions. In our example below, the king on e1 and its destination on g1 are both safe, but the black rook on f8 attacks f1. Because the king must cross f1, White cannot castle kingside.




Castling when the rook is attacked
An attack on your rook doesn’t, by itself, prevent castling. For example, if an opposing piece attacks h1, White may still be able to castle kingside as long as e1, f1, and g1 are safe and the other conditions are met.
Queenside castling has a detail worth remembering. White needs b1, c1, and d1 empty because they all lie between the king and rook. However, b1 can be under attack: the king travels through d1 to c1 and never visits b1.
It’s also fine to castle after an earlier check if you answered it without moving your king or the relevant rook. You might have blocked the check or captured the attacker with another piece. What removes castling rights is moving the king, not having been in check at some point.
When should you castle?
Castling often makes sense during the opening, especially when your king can settle behind a group of pawns and your rook can become more active. It’s still worth looking at the destination before committing. If the pawns in front of g1 have disappeared and enemy pieces are nearby, kingside castling might lead your king toward danger.
As you develop your pieces, you’ll start to notice how the moves prepare castling. For White to castle kingside, the knight on g1 and bishop on f1 need to move, and the bishop usually needs a pawn move to open its diagonal first.
Understanding those connections makes opening moves easier to follow. Our chess opening practice guide explains how to study a line with its ideas in mind. You can also explore en passant if you’re learning the special chess moves together.
Sources & further reading
The diagrams and exercises are teaching examples. Rules references apply to standard chess unless stated otherwise.