Get your taxes done using TurboTax

If you had custody more than half the year, you should indicate that in Turbotax when you edit your child's information.  (Make sure to pick 7 months or longer, since the program interprets 6 months to be exactly half the year, and exactly half the year is not more than half the year.)  Then indicate that you will not claim the child tax credit due to a court or custody order.  The program should still qualify the child for head of household status.  Also, you will need to give the other parent a signed copt of form 8332 releasing the dependent to them.

https://www.irs.gov/forms-pubs/about-form-8332

 

If you had physical custody less than half the nights of the year, you can't use the child to qualify for HOH regardless of the court order.