Trouble Joining Server With Mods

I can join unmodded servers fine and modded servers that I am not hosting but if I host a modded server I cant join it just terminates my connection!

I fixed this by going into settings>multiplayer and turning on the Experiment mod loading option. Hope this helps!