A good rule of thumb is to load the hyperref package as the last package in your preamble. From over 6000 (La)TeX packages, there are some exceptions that should be loaded after hyperref. Here is a list:
cleverefamsrefsfloatbeforehyperrefbeforealgorithmchappgsidecaplinguexgeometryrobustindexhypdestopt,hypcap,hypbmsecattachfileshowframe,showidxuri,pageslts,regstatsrefcheckbookmarkglossariesellipsiscmaptabularxfootnotebackrefminitochypernatapaciteocgx2abntex2cite
Further packages with \RequirePackage{hyperref}:
amsrefsattachfile2bugtracker(part ofpgfplots)classicthesisdoidtx-style(part ofthuthesis)eformsexerquizhypgotoeinsdljsltxdockitopcitprerexrec-thytdclocktoptesiydoc-code,ydoc-descbeamerbasearticlebidituftehyperrefchextrascmpjdtk-pdfeasy-todohephrefhideifmslidelstdococgtoolspdfcommentpdfscreenpdfxrvdtxstrukdocucshyper
Contributions came from here with the help of Lev Bishop, Stephen, Geoffrey Jones, Simon, Werner, and Stijn Hoop.