Ankylosing spondylitis is diagnosed based on your symptoms, medical history, and physical exam. You may also need blood tests and X-rays to confirm the diagnosis.