You are here:
Link to Salesforce Domains in Packages
If you provide a package to Salesforce customers through AppExchange, review your code for hard-coded URLs and code that parses a known URL. The URLs that Salesforce serves for a target org vary based on the org type and configuration. Hard-coded URLs and code that assumes the format of a URL can break when a customer deploys enhanced domains, deploys partitioned domains, or changes their My Domain name. Also, URL formats vary between production orgs, sandboxes, and other non-production orgs. To ensure that your package functionality continues to work with all possible URL formats, update hard-coded URL references to relative URLs whenever possible. When a relative URL isn’t possible, use a dynamically generated host name.

