Ryder returned a positive sample after being tested following a match for provincial side Wellington Firebirds against Northern Knights on March 24, the Sports Tribunal said.
Ryder tested positive for 1-Phenylbutan-2-amine (PBA) and N, alphadiethyl-benzeneethanamine (DEBEA), both of which are banned in competition, and was subsequently handed a six-month provisional ban on April 19.
Even though Ryder will be free to play again from Oct. 19, the batsman said he was "devastated" by his situation.
"Whilst everyone is aware of my well documented battles with alcohol, it's important for me to state that I abhor drug use of any kind, both recreational and performance-enhancing in sport," he said in a statement on the New Zealand Cricket Players' Association website.
He added to Fairfax Media that he felt "fortunate", having been worried that his cricket career might have been over.
"Six months was what I was hoping for. It wasn't the worst I could have got," he said.
The tribunal's decision, released on Monday, said the relative lenience of the ban was because it accepted Ryder's reasons for taking supplements.
"The mandatory penalty for this violation is two years' suspension," it read.
"However, the suspension can be less if the athlete establishes how the prohibited substances got in his system and that the taking of the prohibited substance was not intended to enhance his sport performance."
The tribunal added: "We do not need to detail Mr Ryder's evidence other than to say that he expressed a sensitivity arising from public comments about his weight and, as he was in a good space at the time about his cricketing form, he had decided to make a further attempt to reduce weight."
The decision may raise eyebrows in New Zealand, where Ryder's travails in a rollercoaster career have been a constant source of controversy.
A burly lefthander who stepped away from test cricket last year to deal with personal issues, Ryder has struggled with weight problems throughout his career, along with alcohol and discipline issues.
Days after being tested while playing for Wellington, Ryder was subject to a vicious assault outside a Christchurch nightspot which put him in hospital with critical head injuries.
He is expected to resume his provincial career with Otago later this year.
New Zealand's top anti-doping authority Drug Free Sport NZ (DFSNZ) said it accepted the conclusion that 18-test batsman Ryder was not intending to enhance performance but added that he "had failed to heed clear warnings he had received".
"This is doubly disappointing as DFSNZ, NZ Cricket and the Cricket Player's Association had collaborated to institute an education programme for first class cricketers and Ryder had been part of that programme," chief executive Graeme Steel said in a statement on their website (www.drugfreesport.org.nz).
"Supplements are a minefield for athletes as, while benefits are invariably overstated, accurate information about contents and their status under sport rules is frequently insufficient."
Doping cases have been relatively rare in cricket compared to other sports but a number of high-profile players have failed drug tests.
Pakistan pacemen Shoaib Akhtar and Mohammad Asif, who is currently serving a seven-year ban for spot-fixing, both tested positive for performance-enhancing drugs but had bans overturned on appeal.
Former Australia spinner Shane Warne was famously banned a day before the start of the 2003 World Cup and sent home after testing positive for a banned diuretic.
- Sports & Recreation
- Wellington Firebirds