Basically when ruling, it always says titles lost on succession. I am wondering how exactly you can ensure not losing demesne titles upon death, so that the heir to the kingdom keeps the same demesne holdings as his father did?
It depends on your succession laws. If you have gavelkind succession, your titles will be divided between your children. If you have primogeniture your eldest son will inherit all of your titles.
Now, lets say you rule more than one kingdom. In that case, each kingdom has its own succession laws. You can toggle between them by clicking on the respective coat of arms in the 'Laws' window.
You can read much more in the Succession Laws article on the CK2 wiki.
gavelkind, gotta love and hate it. but ye, as stated by other users, one of your kingoms still has gavelkind or another means of succession.
if i may give you a hint, you dont have to make all kingdom titles, and having only one top title prevents it from splitting up. eg: if you have 3 kingdom titles then those three titles can split, but if you have 3 kingdom titles and one empire title those three kingdoms will remain within the empire, even if someone else inherits them.
another way to make sure only 1 kid gets it all is to ensure only one kid is around to get anything at all!