Main Story Quests all have this marker:

To progress through the story you must do ALL the Main Story quests. I don't think you can even unlock any dungeons except through main story line.

Optional Side Quests have this one:

These quests are optional, although for whatever reason, occasionally you will get one stuck in the middle of a main story chain *shrug*