That's the nature of the web. URLs can become broken over time. I'm not aware of any way to permanently link to a page on a site. The web server could be taken offline, the DNS name could be changed, the page could be removed because it is no longer needed. There are many reasons that URLs break.
Even if you had some encoding scheme, at some point it has to resolve to a URL that can be used and in the cases mentioned earlier that simply isn't possible. In an ideal world whoever provided the link also mentioned a page title or something that you could then query for instead. Otherwise the URL is just broke.