No judgment for costs shall be had under this division against a defendant who suffers a judgment by default against him or who, in his answer, disclaims all title to, interest in, or encumbrance on the lands; but the court shall, in those cases, without further proof, adjudge that such defendant has no estate or interest in or encumbrance on such lands, or any part thereof. Any defendant who shall, by answer under oath, deny that he claims, or ever has claimed, or pretended to have any estate, interest, or encumbrance in, or upon, such lands, or any part thereof, shall be entitled to recover his costs in the action.
Ala. Code § 6-6-545 (1975)