You should really learn about absolute and relative paths. What you’re using is a relative path.
This is an absolute path on your server:
<img src="https://stackoverflow.com/images/logo.png">
This is an url with http protocol – opens Google.com
<a href="http://google.com">Google</a>
This is an url without explicit protocol, it will turn into http or https based on what your page uses:
<a href="https://google.com">Google</a>
Use one of those for what you need (typically the http one).