Ankylosing spondylitis is most often diagnosed through an x-ray. Your health care provider will check for changes in the bones and joints in your spine and hips.