12

Question

Is there a way to reference externally available images when using my domain, such that it doesn't reference the data center?

When I copy the url from the document itself the url still contains the data center, na13 in this case

https://mydomain--c.na13.content.force.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Background

Our org is getting moved to a different data center and I'm in the process of setting up my domain so that any absolute links won't need to be updated again for future data center changes, and so that I can make the changes before the switch and avoid having to time the changes exactly to the completion of the migration. However, it seems like images don't have any option for doing this? Any suggestions?

  • Would something like a DNS redirect be more work than it is worth? Your external references could point to ralphsdomain.dyndns.org/servlet and the DNS service could redirect to your configured value of mydomain--c.na13.content.force.com/servlet or maybe you could build it 'manually' using a known Sites URL instead of the platform generated FQDN with the pod name included in it. – Mark Pond May 28 '14 at 23:19
  • 1
    Are you still going to be on a NA* pod? I was just playing around with the sample URL you provided and found that changing to, say, na1 in the URL would redirect me to https://c.na13.content.force.com/... This is probably a CDN or similar. Disclaimer: Your results after migration may vary. – Daniel Ballinger May 29 '14 at 0:33
  • @MarkPond interesting idea, that'd definitely work as long as we use http. I'm assuming SSL would only work if we could get salesforce to return a cert signed for the CNAME. – Ralph Callaway May 29 '14 at 20:47
  • @DanielBallinger woah, that's interesting, just tested with a bunch of different pods and it does the redirect as long as it's a valid production data center, i.e. na1, eu0 both work, cs1 doesn't. Giving that a try in an email to see if it works outside a browser context. – Ralph Callaway May 29 '14 at 20:52
  • @DanielBallinger so it's not exactly definitive testing, but if i change the url to insecure for the image, it shows up fine when a I test merge the email, but fails if it's secure. For whatever reason salesforce isn't sending the preview email today ... – Ralph Callaway May 29 '14 at 21:00
8

I solved this in our org by changing the URL to the following:

https://mydomain.my.salesforce.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Salesforce will automatically redirect this to:

https://mydomain--c.na13.content.force.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.