The watchdog inspected 11 internet prescription services in England, finding some "potentially presenting a significant risk to patients".
The regulator said while some providers were well-run, others "cut corners".
The CQC says it will visit providers and shut any putting patients at risk.
It follows a BBC Radio 5 Live investigation into online pharmacies selling antibiotics.
The CQC has published reports on urgent inspections of two websites: Treated.com, run by HR Healthcare, and MD Direct, which traded through Assetchemist.co.uk.
Prof Steve Field, the CQC's chief inspector of general practice, said there was "little clinical oversight" in the way many websites sold medications.
"Some of these websites prescribed unlicensed medicines and - even more worryingly - medicines for diabetes, Parkinson's disease, heart disease and Lithium for bipolar disorder," he told BBC's Radio 5 Live.
"Patients can go online, self-diagnose their condition, order their own medicine and obtain a prescription from the online doctor service, with minimal checks," he said.
The CQC has now published a clear set of standards for online pharmacies, saying they must:
§ verify that patients match their photo ID, such as through a Skype check
§ get a comprehensive and up-to-date medical history
§ ensure patients truly understand what medicines they are being given
§ seek permission to contact a patient's GP
Treated.com was the focus of the 5 Live investigation in October. The CQC suspended the website two months later and began an inspection of its operations.
Riaz Vali, responsible for Treated.com, told the BBC it was making improvements to its processes and systems.
The second provider, MD Direct Ltd, was also inspected in December and voluntarily cancelled its registration.
The CQC found both providers demonstrated significant safety and organisational risk to patients, with widespread failure to provide safe care.
The main concerns included little to no verification of patients' identities, inadequate prescribing and no assurances that the clinicians working behind the sites had the relevant skills or qualifications for the roles they were performing.
The CQC has published its first guidelines to online providers about how it inspects services in England.
How to choose an online service?
The CQC offers tips for the public before they click and buy:
§ check that an online doctor service is registered with the CQC or, if an online pharmacy service, with the General Pharmaceutical Council using the EU common logo
§ check on their address and where you can contact them
§ check how must the service will cost
§ check who works there - are they based in the UK or overseas, and are they registered?
§ check you have been given clear information about the medicine prescribed
'Not like sweets'
Gerald Heddell, director of inspection, enforcement and standards at the Medicines and Healthcare products Regulatory Agency (MHRA), said: "Prescription-only medicines are prescription only for a reason and should only be taken under the supervision of a healthcare professional.
"We are working closely with colleagues at the Care Quality Commission and the General Pharmaceutical Council to ensure online sellers act responsibly to protect public health.
"Anyone selling medicines to the public via a website must be registered with MHRA and display the common logo on every page of the website offering medicines for sale."
Charlie Massey, chief executive and registrar of the General Medical Council, which regulates doctors, said he welcomed innovation and supported remote prescribing when it followed the GMC's guidance, but said it was clear not all practitioners were following the guidance.
Lord O'Neil, who led the government's review into antimicrobial resistance, said he was very concerned by the sale of antibiotics on websites.
"We need to stop treating antibiotics as if they are sweets and we need to be a lot tougher and disciplined about how they are being used," he said.
Scientists have previously warned of an 'antibiotic apocalypse' as bacteria become resistant to more and more drugs.