Recent studies have shown association of the IL23R gene with inflammatory bowel disease, psoriasis and ankylosing spondylitis. We aimed at studying the involvement of IL23R in celiac disease (CD) and multiple sclerosis (MS). We performed a case-control study including 598 patients with CD, 414 with MS and 546 healthy controls, all of them white Spaniards. All samples were genotyped for two single nucleotide polymorphisms: rs7517847 and rs11209026 (Arg381Gln). Statistical analyses were performed using χ2-tests or the Fisher's exact test. The minor allele (Gln) of the coding variant Arg381Gln was significantly increased in CD and MS patients when compared to controls (8% in CD vs 6% in controls, P = 0.02; 9% in MS, P = 0.006). In MS, a stronger effect was observed in patients showing primary-progressive disease (16%, P = 0.004). Moreover, heterozygotes for rs7517847 were significantly increased in this group of MS patients (81% in MS vs 48% in controls, P = 0.0002). In conclusion, contrary to what has been described previously, the less frequent allele of the functional polymorphism Arg381Gln (rs11209026) seems to be increasing susceptibility to CD and MS, although in this last group of patients a stronger effect is observed in patients affected of a primary-progressive form.