Castling in Chess: Kingside vs. Queenside Rules and Examples
What is castling in chess?
Castling in chess is a special move involving your king and one rook. In a single move, the king travels two squares toward the chosen rook, and that rook moves to the square immediately on the other side of the king. Castling is usually used to move the king toward safety and connect the rooks.
There are two versions: kingside castling (short castling) and queenside castling (long castling). Both sides can castle at most once per game, and only if the legal conditions are satisfied.
How kingside and queenside castling work
| Side | Move | King goes | Rook goes | Notation |
|---|---|---|---|---|
| White | Kingside | e1 → g1 | h1 → f1 | O-O |
| White | Queenside | e1 → c1 | a1 → d1 | O-O-O |
| Black | Kingside | e8 → g8 | h8 → f8 | O-O |
| Black | Queenside | e8 → c8 | a8 → d8 | O-O-O |
Although two pieces move, castling counts as one move. You do not first move the rook and then the king as two separate turns. In standard over-the-board play, the king is moved first.

Five conditions for legal castling
- The king has never moved. Even if it returned to its starting square, castling is no longer allowed.
- The rook you castle with has never moved. Moving it out and back still loses the right with that rook.
- No pieces stand between the king and the chosen rook. Clear the relevant squares first.
- Your king is not currently in check. You cannot castle to escape an existing check.
- The king does not cross or land on an attacked square. Castling through check or into check is illegal.
The rook itself can be under attack, and in standard chess the square crossed by the rook can be attacked; the restriction concerns the king’s path. You also cannot castle if doing so would leave your king in check.
How to castle kingside step by step
For White, clear f1 and g1 by moving the pieces that started there. Ensure the king on e1 and rook on h1 have never moved, and check that e1, f1 and g1 are not attacked by Black. Then play O-O: the king ends on g1 and the rook on f1.
For Black, the corresponding squares are e8, f8 and g8. Black’s king moves to g8 and the h8 rook moves to f8. This is the same basic procedure on the opposite side of the board.
Do not assume castling is legal just because the two squares between the king and rook are empty. A bishop, rook or queen may attack a square the king would pass through.
How to castle queenside step by step
For White, clear b1, c1 and d1 between the king and the a1 rook. Confirm that the king and rook have never moved and that the king’s path e1, d1, c1 is safe from attack. The king moves to c1, and the rook moves from a1 to d1.
For Black, clear b8, c8 and d8. The king travels from e8 to c8 and the a8 rook lands on d8. Note that the king does not cross b1 or b8; that square must be empty for the rook’s move, but an enemy attack on b1 or b8 alone does not prohibit queenside castling.
Can you castle while in check or through check?
No. The king cannot castle while currently in check, pass through a square attacked by an opposing piece, or finish on an attacked square. For example, White cannot castle kingside if Black attacks f1, even if g1 is safe. White also cannot castle kingside if g1 is attacked, even if f1 is safe.
You can, however, sometimes castle after previously being in check, as long as the king never moved and the current position satisfies all conditions. A check earlier in the game does not automatically erase castling rights; a king move does.
Can you castle if the rook is attacked?
Yes, in standard chess, an attacked rook does not by itself make castling illegal. The king’s safety and the movement history of the king and chosen rook are the deciding factors. Likewise, an enemy piece attacking b1 does not automatically prevent White from castling queenside, because the king travels through d1 and ends on c1.
This distinction can matter in tactics. Before rejecting a castle, check which squares are attacked and which piece would occupy each square after the move.
When should you castle in a game?
Castling often helps beginners get their king away from the center and bring a rook toward an open or potentially open file. In many ordinary openings, players aim to castle during the early phase of the game. However, castling is not automatically the safest move in every position.
Consider whether your destination wing has a healthy pawn shield, whether the opponent has already launched a pawn attack there, and whether the center is opening. Castling queenside may support an aggressive opposite-side attack, but it also places your king nearer the a- and b-files. Sometimes the king is safer staying in the center temporarily, especially when the center is closed.
Castling in online chess and notation
Most chess websites and apps let you castle by moving the king two squares to its destination. The rook then moves automatically. If the move is rejected, look for a piece blocking the route, a previous king or rook move, or an attacked king-path square.
In algebraic notation, kingside castling is written O-O and queenside castling is O-O-O, using the letter O rather than the digit zero. In a game score, the same notation applies to White and Black.
Castling mistakes beginners make
| Mistake | Correction |
|---|---|
| Trying to castle after moving the king and returning it | Castling rights were lost when the king first moved |
| Trying to castle with a rook that moved earlier | Use the other rook if eligible, or play normally |
| Only checking whether the destination is safe | Also inspect the starting and transit squares |
| Thinking an attacked rook forbids castling | The rule protects the king’s path, not the rook’s square |
| Confusing queenside castling with three-square king movement | The king always moves two squares in standard chess |
Frequently asked questions
Can you castle on both sides in one game?
No. Once you castle, your king has moved and you cannot castle again.
Can you castle out of check?
No. Your king must not be in check at the start of castling.
Can you castle after moving your queen?
Yes. The queen’s movement does not itself remove castling rights, though the required squares must be empty and safe for the king.
Can you castle if the rook is under attack?
Yes, provided the king’s path is legal and all other conditions are met.
Is castling mandatory?
No. It is an optional move and sometimes strategically unwise.
Is castling different in Chess960?
Chess960 uses special starting positions and adapted castling procedures. The examples in this guide describe standard chess; consult the variant’s specific rules for Chess960.
Official rules and next step
The FIDE Laws of Chess cover castling in Article 3.8.2. Practice setting up the initial board, clearing the path and checking the three king squares for attack. Then play O-O and O-O-O with both colors until the final king and rook squares become automatic.