Do your research. Not all online courses are created equal. There are reputable, well-respected universities that offer courses online.
There are also schools that offer courses that are not all that well-respected.
Do some online research. Consumer reviews, etc.
"You may not have lost all your marbles, but there's definitely a hole in the bag." Grumpy Cat