It is because in castling the king first moves two squares towards the rook, after which the rook moves over the king. To castle long in your position the king would have to move across a square with check (d8, threatened by the rook at d1), which is not allowed.
Hi I was unable to castle queen-side
, can someone explain why? Was it because I was castling through a rook attack? ?
Thanks in advance. Also how do I upload a PGN file?