There are two ways to buy a business, and they have very different consequences for what you inherit along with it.
Asset purchase
You buy the things: the domain, the code, the customer contracts, the brand, the mailing list. The seller's legal entity stays with the seller, along with its history.
You inherit: the assets you listed, and nothing else.
You don't inherit: past tax liabilities, existing lawsuits, old contracts you didn't name, employment history.
Cost: every asset has to be individually assigned. Customer contracts may need consent to transfer.
Share purchase
You buy the company itself. Everything it owns comes with it — and so does everything it owes.
You inherit: all of it. Contracts continue uninterrupted, which can be genuinely valuable.
You also inherit: unknown liabilities, tax history, and anything the seller forgot to mention.
Cost: far more diligence, and warranties that actually mean something.
When a share purchase is worth it
Contracts that legally can't be assigned but continue automatically under a change of ownership.
Licences, registrations or platform accounts tied to the entity and non-transferable.
A payment processor relationship with real history that would take years to rebuild.
Meaningful tax attributes — genuinely a question for an accountant in your jurisdiction, not for an article.
What changes in the paperwork
An asset purchase agreement needs a complete schedule of assets. Anything not listed does not transfer. This is where deals quietly break: the domain and the repo are in the schedule, and the analytics property, the ad account and the support inbox are not.
Write the schedule from the buyer's side, from your diligence notes, and make the seller confirm each line. If it isn't in the schedule, assume you didn't buy it.
None of this is legal advice, and the answer genuinely varies by country. What travels everywhere is the principle: know which of the two you're doing before you start drafting, because the documents are not interchangeable.