Coconut is not a botanical nut. It is classified as a fruit, even though the Food and Drug Administration (FDA) recognizes coconut as a tree nut. Even though coconut isn't a nut, some people who are allergic to tree nuts (like almonds, cashews, and walnuts) are also allergic to coconut. It's probably best to talk to your doctor and see if having coconut would cause an allergic reaction, especially if you are allergic to tree nuts.
Resource by American College of Allergy and Asthma and Immunology