If you're using a standard LaTeX document class, such as report
, you can use the tocbibind package, and then you won't need the \addcontentsline
command and the hyperlinks should work correctly. From the documentation:
The tocbibind
package enables the titles of the Table of Contents, the List of Figure, the List of Tables, the Bibliography and the Index all to be added to the Table of Contents.
I'd also suggest looking at the memoir class, which also solves this problem. It's intended to be a replacement for the standard report
and book
classes, and provides lots of options and commands for customisation.