You can reference a link with the following format:
page
====
`My Header <http://example.com/page.html#my-custom-headerlink>`_
----------------------------------------------------------------
or
`My Header <page.html#my-custom-headerlink>`_
----------------------------------------------------------------
You can also reference it like:
`my-header`_
--------------
.. _my-header: http://example.com/page.html#my-custom-headerlink
Using raw html you can have more control including control over the headerlink, however you lose it rendering in the toc.
.. raw:: html
<div class="section" id="my-custom-headerlink">
<h2><a class="reference external" href="index.html#my-custom-headerlink">My Header</a>
<a class="headerlink" href="#my-custom-headerlink" title="Permalink to this headline">¶</a></h2>
</div>