q-polynomials can be defined for all the possible parameters, but their orthogonality properties are unknown for several configurations of the parameters. Indeed, orthogonality for the Askey-Wilson polynomials, p n (x; a, b, c, d; q), is known only when the product of any two parameters a, b, c, d is not a negative integer power of q. Also, the orthogonality of the big q-Jacobi, p n (x; a, b, c; q), is known when a, b, c, abc −1 is not a negative integer power of q. In this paper, we obtain orthogonality properties for the Askey-Wilson polynomials and the big q-Jacobi polynomials for the rest of the parameters and for all n ∈ N 0 . For a few values of such parameters, the three-term recurrence relation (TTRR)x p n = p n+1 + β n p n + γ n p n−1 , n ≥ 0, presents some index for which the coefficient γ n = 0, and hence Favard's theorem cannot be applied. For this purpose, we state a degenerate version of Favard's theorem, which is valid for all sequences of polynomials satisfying a TTRR even when some coefficient γ n vanishes, i.e., {n : γ n = 0} ̸ = ∅.We also apply this result to the continuous dual q-Hahn, big q-Laguerre, q-Meixner, and little qJacobi polynomials, although it is also applicable to any family of orthogonal polynomials, in particular the classical orthogonal polynomials.