Minecraft wiki entry for Defeating_the_ender_dragon, associated text: While the dragon is flying you can shoot it with your bow or crossbow. However, the dragon is difficult to shoot because it can fly fast, and shots miss if they don't line up properly. It is recommended to shoot at a spot in the dragon's flight trajectory, which is the area in front of it, and it flies far enough to get hit by the arrow. Try to mainly shoot it in the head because the dragon takes the most damage on its head.