Code of Alabama — Title 40 (Revenue and Taxation)
Ala. Code § 40-1-24 — Duty of Sheriff in Selling Property Under Execution, Etc
When any sheriff or other officer shall sell any property under execution or other process, or under any decree, judgment, or order of any court, it shall be his duty to ascertain what taxes are a lien upon such property and, upon a sale thereof, to first apply the proceeds of such sale to the payment of such taxes.
Source: official text