It depends on who you buy from, if you're getting it from something like "$brandname Official Store" then it's likely legit, if it's Store1376326482 at half the price of the (likely) official store then who knows what you'll get.
Not always the case, but it can be an indicator. This shop poses as somewhat official, but I doubt it to be true. I bought these batteries and assessed them to be fakes. The one review there is mine.
Ah, good point, buying from "$widely-faked-battery-brand Store" could be a bit of a gamble. I was thinking more vendors of electronic devices who often link to their stores from their web site or vice versa, or for which there's only one "Official Store" branded store which is likely the real deal. ComWinTop and CDEbyte are examples of this.
Drifting off topic, I'd never buy 18650s off a random Aliexpress store unless info on it came from somewhere like candlepowerforums or budgetlightforums, those guys spend a lot of time sorting the wheat from the chaff and will post links to legit stores and sellers. Alternatively, if possible find a local seller who posts legit capacities and charge/discharge curves where you know you're getting the real deal.