How to Castle in Chess: Rules, Examples and Common Mistakes
To castle in chess, move your king two squares toward a rook, then jump that rook over the king to the square beside it. It is a single move, and it is the best way to get your king to safety and bring a rook into the game.
This guide explains what castling is, how to castle on a real board and online, the rules for when you can and can’t castle (including whether you can castle while in check), and the mistakes beginners make most often. If you are new to the game, read the basic chess rules first.
How to castle in chess in 3 steps
- Check that you can castle. Your king and that rook have not moved, the squares between them are empty, and your king is not in check and does not cross an attacked square.
- Move the king two squares toward the rook you want to use.
- Move the rook over the king, to the square right next to it on the other side.
Online, you only move the king two squares, and the site moves the rook for you.
What is castling in chess?
Castling is a special move involving your king and one of your rooks. In a single move:
- Your king moves two squares toward the rook.
- The rook jumps over the king and lands on the square right next to it, on the other side.
It is the only time the king moves more than one square, and the only time you move two pieces in one turn.
People also call the rook a castle, but castling is the name of this special king and rook move. It can look like the king and rook switch places, but they don’t: the king moves two squares, and the rook jumps to the square the king crossed.
Why castle?
- It protects your king. The king ends up in a corner, behind a wall of pawns, away from the center where attacks happen.
- It activates a rook. The rook moves out of the corner and toward the center, where it is more useful.
- It saves time. Doing both in one move is faster than moving the king and rook separately.
Most strong players castle within the first ten moves. It is one of the simple chess strategies for beginners that helps you win more games.
The two types of castling
There are two ways to castle, depending on which rook you use.
| Detail | Kingside castling | Queenside castling |
|---|---|---|
| Also called | Short castling | Long castling |
| Rook used | The rook on the h-file | The rook on the a-file |
| White’s king moves | e1 to g1 | e1 to c1 |
| White’s rook moves | h1 to f1 | a1 to d1 |
| Black’s king moves | e8 to g8 | e8 to c8 |
| Black’s rook moves | h8 to f8 | a8 to d8 |
| Written as | O-O | O-O-O |
The kingside is the side where the king starts next to the bishop and knight, with two squares between the king and the rook. The queenside is the side where the queen starts, with three squares between the king and the rook.
Kingside castling (short castling)
In kingside castling, the king moves from e1 to g1, and the rook moves from h1 to f1. To do it, you first need to clear the bishop on f1 and the knight on g1.

Kingside castling is the most common type, because it needs fewer pieces moved out of the way and it leaves the king in the safest corner.
Queenside castling (long castling)
In queenside castling, the king moves from e1 to c1, and the rook moves from a1 to d1. To do it, you first need to clear the queen, the bishop on c1, and the knight on b1.

Queenside castling takes longer to set up, and the king ends up one square closer to the center. But the rook lands on the d-file right away, which can be strong.
Can you castle on both sides?
You can choose either side, but only one of them in a game. After you castle, your king has moved, so you can’t castle again. Until you castle, you keep both options open as long as the king and both rooks have not moved.
When can you castle in chess? The four rules
You can castle only when all four of these are true:
- Neither piece has moved. The king and the rook you want to castle with must not have moved at any point in the game. If you moved the king, you can no longer castle on either side. If you moved one rook, you can still castle with the other one.
- No pieces are in between. Every square between the king and the rook must be empty.
- The king is not in check. You can’t castle to escape from a check.
- The king doesn’t cross or land on an attacked square. The two squares the king passes through and lands on must not be attacked by any enemy piece.
A few details that surprise beginners:
- The rook can be attacked. It is fine if an enemy piece is attacking the rook, before or after castling.
- On the queenside, the b-file square only needs to be empty. The king doesn’t go through it, so it can be attacked.
- Being in check earlier doesn’t matter. If your king was in check before but never moved, you can still castle once you are out of check.
Can you castle in check, out of check or after being in check?
No, you can’t castle while your king is in check, and you can’t castle to get out of check. You also can’t castle through check, which means crossing or landing on a square an enemy piece attacks. You can castle after being in check, as long as you answered the check without moving your king, by blocking it or capturing the attacker.
| Situation | Can you castle? |
|---|---|
| Your king is in check right now | No |
| Your king was in check earlier but has not moved | Yes |
| Your king would cross an attacked square | No |
| Your king would land on an attacked square | No |
| Your rook is under attack | Yes |
| Your king or that rook has already moved | No |
| A piece stands between the king and the rook | No |
When you can’t castle: two examples
You are in check. If an enemy piece is attacking your king, you must deal with the check first. Castling is not allowed.

The king would pass through an attacked square. Imagine a black bishop on c4 that attacks the f1 square. Your king would have to cross f1 to castle kingside, so the move is not allowed, even if the king is safe on e1 and g1.

How to castle on a real board
On a physical board, move the king first, two squares toward the rook. Then pick up the rook and place it on the other side of the king. If you move the rook first, it counts as a rook move, and in a serious game you may lose the right to castle. Online, you click the king and then the castling square, and the site moves the rook for you.
How to castle on Chess.com, Lichess and phone apps
Online, you only move the king. Drag the king two squares toward the rook (to g1 or c1 if you are White), or tap the king and then tap the square two squares away. The site moves the rook for you. Some sites also accept moving the king onto the rook, so check your site’s settings.
When you pick up the king, the squares it can legally move to are usually marked, so you can see whether castling is allowed. If the castling square isn’t marked, one of the rules above isn’t met: the king or rook has moved, a piece is in the way, or the king is in check or crossing an attacked square.
Which side should you castle?
For beginners, kingside castling is usually the better choice. It takes fewer moves to prepare, and the king ends up in the safer corner. Queenside castling is a good option when your opponent has already castled kingside and you want to attack their king, or when the kingside is blocked.
Once you castle, try not to push the pawns in front of your king without a good reason. They are the shield that keeps it safe.
Common castling mistakes
- Moving the rook first. On a real board, always move the king first.
- Moving the king too soon. A single king move, even a move back again, ends your right to castle.
- Forgetting a piece in between. Check that every square between the king and the rook is empty.
- Trying to castle out of check. It is never allowed.
- Castling through an attacked square. Check the square next to your king, not just the final square.
- Waiting too long. A king in the center for many moves is an easy target.
- Opening the pawns in front of your castled king. This can leave your king exposed.
Frequently asked questions
Can you castle if your rook has moved? No, not with that rook. You can still castle on the other side if the other rook hasn’t moved.
Can you castle out of check? No. You must get out of check first, and you can only castle if the king hasn’t moved.
Can you castle through check? No. The king can’t pass through, or land on, a square that an enemy piece attacks.
Can you castle if the rook is under attack? Yes. Only the king’s squares matter. The rook can be attacked.
Is castling required? No, but it is a good habit. It is often the safest way to protect your king.
How do you write castling in chess notation? Kingside castling is written O-O, and queenside castling is written O-O-O.
Does castling count as one move? Yes. Even though two pieces move, it counts as a single move.
Can you castle while in check? No. You must deal with the check first, and you can’t castle to escape it.
Can you castle after being in check? Yes, if your king and that rook have not moved and the check is over. Blocking or capturing the attacker doesn’t use up your right to castle, but moving the king does.
Can you castle on both sides? You can choose either side, but only once per game, because the king has moved after castling.
What is a castle in chess? Some players call the rook a castle. Castling is the special move that moves the king two squares and the rook next to it.
How does the king move in chess? One square in any direction. Castling is the only time it moves two squares. See how each piece moves.
How do you castle on Chess.com or Lichess? Drag the king two squares toward the rook, or tap the king and then the castling square. The site moves the rook for you.
What to learn next
Now that you can castle, learn how each piece moves and what each piece is worth, and set up a few practice games to try castling on both sides. You can also read the official rules of chess for the exact wording.
