Make sure the site requires a prescription and has a pharmacist available for questions.
Buy only from licensed pharmacies located in the United States. The National Association of Boards of Pharmacy has more information about licensing and its program to certify online pharmacies.
Don't provide personal information such as credit card numbers unless you are sure the site will protect them.