Well, you could have the child sent away to a foreign land under a new identity and protected by trusted allies. Or perhaps they are hidden within the confines of a monastery or a hidden palace chamber that only a select few know about.
Well, one way could be to disguise the child's identity and pass them off as someone else. Maybe give the child a new name and a different background story. Another option is to have a trusted ally take the child far away and raise them in anonymity.