You can use a relative path to link to pages on the same website.
<a href="/example">Text Here</a>
The above example would go to the file example
at the root directory (/
) of the server.
If this link was on http://example.com, the following two links would bring the user to the same location
<a href="/page">Text Here</a>
<a href="http://example.com/page">Text Here</a>
Both of the above would go to the page
file at the root directory of example.com
.