Overview
Salesforce hosts your orgs in various ‘instances’ (e.g. na1.salesforce.com). However, they frequently move orgs between these instances to balance server load or to perform server maintenance. Direct links to specific Salesforce instances will stop working during this time, which could impact business processes which depend on linking out to specific Salesforce data.
Example
The following apex code is incorrect:
String leadUrl = '<https://us1.salesforce.com/>' + myLead.Id;
Instead you should use the URL.getOrgDomainUrl() method.
This is correct:
String leadUrl = URL.getOrgDomainUrl().toExternalForm() + '/' + myLead.Id;
