Right now in the UK, they have a system of male primogeniture which applies to titles.
It essentially means that male heirs are given first priority over female heirs, regardless of age or relation to who owns the title.
In the Letters Patent for the 1986 creation of the Dukedom of York explains that the title will be inherited by “heirs male of the body”.
Prince Andrew only has daughters - Beatrice and Eugenie, which means after his death his title may be passed down to a different Royal family member.
A Quora user who runs a British Line of succession website has admitted that the Duke of York title may pass on to William and Kate's youngest son Prince Louis.
They wrote: "The Dukedom of York will be inherited by the oldest legitimate son of the current duke.
"Of course, the current duke has no sons, so unless that situation changes, the title will go extinct and will be available for the monarch at the time to recreate and confer on whoever they want.
Adding: "Of course, the title is usually given to the second son of the monarch, so we would need to know who the monarch will be at the time.
"Given that Prince Andrew is twelve years younger than Prince Charles, it seems likely that when Prince Andrew dies and the dukedom becomes available, Prince Charles will have already died and Prince William will be the king."
They continued: "Prince William’s second son is Prince Louis, so he will be a prime candidate to get the dukedom"
Beatrice will most-likely miss out on this title from her father, but that doesn't mean there is no hope for the princess!
A bill calling to change the law so that women can inherit the hereditary titles passed its first stage in Parliament last year.