Vibe ChessVibe Chess

Castling in chess: kingside, queenside and when it is forbidden

Alexey Mudry · updated August 25, 2026
Castling is the only move in chess where two pieces move at once, and the only one where the king travels two squares. That is why it causes more arguments at the board than anything else: can you castle out of check, does an attacked rook get in the way, do you lose the right after the king comes back. Below is every rule shown on a board, with the position before and after the move. The rules in general - how to play chess.

What happens when you castle

The king moves two squares towards the rook, and the rook jumps over it and lands on the other side, right next to it. Both movements are one move, not two: the opponent replies after both of them.

The point of the move is twofold. The king leaves the centre, where it is easier to attack, and hides behind a wall of its own pawns. And the rook, which normally sits idle in the corner throughout the opening, reaches a central file and joins the game. One move solves two problems at once - which is why players castle in almost every opening.

87654321
abcdefgh
Before the move: king on e1, rook on h1, f1 and g1 empty. The blue arrow is the king, the green one the rook.
87654321
abcdefgh
After kingside castling: the king on g1, the rook has jumped to f1.

Kingside castling: 0-0

Kingside castling goes towards the near rook - the one on h1 for White and h8 for Black. There are only two squares between king and rook, so it is quicker to prepare: you only have to move the knight and the bishop.

  • King: e1 → g1 (for Black e8 → g8).
  • Rook: h1 → f1 (for Black h8 → f8).
  • Squares to clear: f1 and g1 - usually the bishop and the knight.

For Black it is all mirrored, on the eighth rank. It is worth looking at it once through Black's eyes: on a board, «to the right» means opposite directions for the two sides.

87654321
abcdefgh
Kingside castling for Black: king e8 → g8 (blue), rook h8 → f8 (green).

Queenside castling: 0-0-0

Queenside castling goes towards the far rook - a1 for White, a8 for Black. The king still travels two squares, but the rook covers three - hence the alternative name, long castling.

87654321
abcdefgh
Before the move: three squares must be empty - b1, c1 and d1. The king (blue) travels two, the rook (green) three.
87654321
abcdefgh
After queenside castling: the king on c1, the rook on d1.

The practical difference: preparation takes longer - knight, bishop and queen all have to move - and the king ends up on c1, slightly closer to the centre. The square b1 is left uncovered by the rook, so the first thing players often do is tuck the king away with Kb1 after castling.

87654321
abcdefgh
Both rooks in place and the squares clear - both kingside and queenside castling are available. The choice is yours.

How to castle with your hands

At a tournament this is not a detail: the order of actions is fixed by the rules, and getting it wrong can leave you with a move you did not intend.

  • One hand. FIDE rules require a move to be made with one hand, and castling is no exception. Using both hands at once is an infraction.
  • Touch the king first. If you pick up the rook first, your opponent may insist that you move the rook - the touch-move rule. Taking the king first removes all ambiguity.
  • Press the clock after both pieces. Castling is one move, and it is not finished until the rook is on its square. A convenient way to keep time is an online chess clock in the browser.

The touch-move rule and the other tournament details are covered in the rules of chess.

The four cases where castling is forbidden

There are exactly four restrictions. The first two are about pieces, the second two about the king's safety.

1. The king or that rook has already moved

The right is lost for good and does not come back, even if the piece returns to its original square. The rooks count separately: once the h1 rook has moved, kingside castling is gone but queenside remains.

2. There is a piece between the king and the rook

Any piece - yours or your opponent's. Every square between them must be empty: two for kingside, three for queenside.

87654321
abcdefgh
Kingside castling is impossible: the bishop occupies f1. It has to move first.
87654321
abcdefgh
Queenside castling is impossible: the knight is on b1. That square has to be cleared too.

3. The king is in check

You cannot castle out of check. First block the check, move the king or capture the attacker - and if the king itself did not move, the right to castle survives.

87654321
abcdefgh
The rook on e8 has the king in check - castling is forbidden until the check is dealt with.

4. The king passes through an attacked square or lands on one

The king may not cross a square that is attacked, and may not arrive on one. Both squares on its route have to be checked: f1 and g1 for kingside, d1 and c1 for queenside.

87654321
abcdefgh
The rook attacks f1 - the king would cross an attacked square. Not allowed.
87654321
abcdefgh
The rook attacks g1 - the king would land in check. Also not allowed.

What is allowed, though many people think otherwise

Two cases cause most of the mistakes at the board - and both times people forbid more than the rules do.

An attacked rook does not stop you

The restrictions concern the king and the squares it travels through. The rook may stand under attack, and it may cross an attacked square - none of that affects the right to castle.

87654321
abcdefgh
The black rook attacks the white one on h1, but the king and the squares f1 and g1 are safe - castling is allowed.

When castling queenside, b1 may be attacked

The king travels e1 → d1 → c1 and never touches b1 at all - only the rook passes through it. So an attack on b1 does not prevent queenside castling.

87654321
abcdefgh
The bishop on f5 covers b1, but the king does not go there - queenside castling is legal.

And one more: being checked does not destroy the right. Only moving the king does. If you managed to block the check with another piece, you can still castle later.

How castling is written down

  • 0-0 - kingside (written O-O with letters).
  • 0-0-0 - queenside (O-O-O).

A simple way to remember how many zeroes go where: there are as many as there are squares between king and rook before the move - two for kingside, three for queenside. How to keep a scoresheet in general - chess notation and scoresheets.

In computer UCI notation castling is written simply as a king move: e1g1 or e1c1. That is why engines and board editors show it as a single pair of squares, with no rook involved.

Which way to castle

There are no rules here, only considerations. Kingside is faster and safer, queenside is more aggressive.

Kingside (0-0)Queenside (0-0-0)
Ready sooner: two squares to clearReady later: three squares to clear plus the queen to move
King further from the centre, pawns untouchedKing on c1; b1 usually needs one more move
Rook lands on f1 - useful when attacking f7Rook lands straight on d1 - pressure down the central file
The usual choice in quiet positionsThe choice when you plan a pawn storm against the enemy king

A story of its own is opposite-side castling: one player goes right, the other left. Then each keeps the pawns in front of his own king and throws the rest at the opponent's - the game becomes a race of attacks, and tempo matters more than material.

A practical rule for beginners: castle within the first ten moves and do not put it off. A king stuck in the centre with the files opening is the most common cause of quick losses.

Castling in Fischer Random

In Fischer Random (Chess960) the pieces on the first rank start in a random order, but castling exists there too - and the final squares are exactly the same: the king ends up on g1 when castling kingside and on c1 queenside, with the rook on f1 and d1 respectively.

It looks strange from the outside: king and rook can start almost anywhere and appear to teleport onto their squares. The conditions are the usual ones - the king has not moved, the rook has not moved, and the squares between them and along the king's route are empty and not attacked. The full picture - Chess960 (Fischer Random).

Try it on a board

Set any of these positions up and castle yourself - the rule sticks far faster that way than from a picture.

Common questions about castling

What is castling in chess?

The only move in which two pieces of the same colour move at once: the king and a rook. The king shifts two squares towards the rook, and the rook jumps over it and lands beside it. It counts as a single move.

What is the difference between kingside and queenside castling?

The side of the board. Kingside castling (0-0) is towards the h-rook: the king goes to g1 and the rook to f1. Queenside castling (0-0-0) is towards the a-rook: the king to c1, the rook to d1. Black does the same on the eighth rank.

When is castling not allowed?

In four cases: the king or that particular rook has already moved; there is a piece between the king and the rook; the king is currently in check; or the king would pass through an attacked square or land on one.

Can you castle if the rook is attacked?

Yes. The restrictions apply only to the king and the squares it travels through. An attacked rook, and an attacked b1 square when castling queenside, are no obstacle at all.

Can you castle after being in check?

Yes, provided the king itself did not move. Once the check is dealt with, the right to castle remains. But if the king had to move, the right is gone for good, even after it returns to e1.

Which hand do you castle with?

One hand, and touch the king first. FIDE rules require the move to be made with a single hand; if you pick up the rook first, the arbiter may rule that you have moved the rook.

How is castling written down?

Kingside is 0-0, queenside is 0-0-0. In English notation the letter O is used: O-O and O-O-O. The number of zeroes matches the number of squares between king and rook before the move.

How many times per game can you castle?

Once. After castling the king counts as having moved and the right disappears - even if the pieces are later returned to their original squares.

The tournament app

Anyone can be the organizer

There are no club or arbiter roles in the app: the create button is available to everyone. You can announce a tournament today and run it this weekend.

  • Swiss
    when there are more than ten players and nobody should be knocked out
  • Round robin
    when the field is small and fairness matters most
  • Free meetup
    when you simply want to get together and play

More than a bot: the app, FIDE rules and a TRF report

  • The app. Besides the bot there is an app - inside Telegram and simply at vibechess.ru/app: what is on in your city, the player list, a live table, the current round, your profile and game history - everything that is awkward to read as chat messages.
  • Pairings by FIDE rules. Pairings are computed by bbpPairings, an open-source engine implementing the Dutch system: score groups, floats on an odd field, colour alternation, no rematches and no two byes in a row.
  • A TRF report. A finished tournament exports as a single file in the FIDE data exchange format - the one arbiter software and federations accept. Your profile stores the FIDE ID, national federation code, title, sex and date of birth for it.
  • Free. All of the above, with no subscriptions, paid plans or limits on the number of tournaments and players.

Full overview

Missing a feature? Message the developers

The bot is constantly improved based on real tournaments. If you need a feature that isn't there yet, message the developers right inside the bot with the /support command. Many features appeared exactly because organizers asked for them, and useful ideas get added quickly.

What to read next

All the rules - how to play chess. The starting position - setting up the board. Terms - chess glossary.

Alexey Mudry
Alexey Mudry · hosted 15 Vibe Chess events

At the board since childhood: hazy about his rating, precise about every rook he has blundered. Counts an evening as a good one if the opponent stayed to talk afterwards instead of rushing off to check with an engine. Message →