We've got a website that's hosted on salesforce sites. A customer has requested to redirect all the requests to the website to a website2, because he no longer wants to host it in salesforce.

So let's say we have a http://Awesome.TheBestWebsite.com. On the website we've got tons of pages like:

  • http://Awesome.TheBestWebsite.com/page1
  • http://Awesome.TheBestWebsite.com/superPage1
  • http://Awesome.TheBestWebsite.com/page2

I'd like to redirect all requests from http://Awesome.TheBestWebsite.com to http://Best.TheBestWebsite.com. Is there a way to do it?

URL redirect doesn't suit my requirements, since I need to set every URL I'd like to redirect and there're many of them (thousands, or even more).

  • Was the traffic actually going to a *.force.com address, or were people going through a custom domain? – martin Jul 25 '17 at 13:51
  • 1
    If www.AwesomeWebsite.com was already an alias for your force.com site and that's primarily what people used, it would just be a matter of directing the traffic to the new host. – martin Jul 25 '17 at 13:56
  • @martin thank you! Changed the post - we basically need to redirect from "Awesome" 3rd-level-domain to "Best" 3rd-level domain. "Awesome" 3rd-level domain is hosted on salesforce sites, while "Best"'s hosted by "TheBestWebsite", not us. – EvAzi Jul 25 '17 at 14:12

The hosting of a site and the ownership/control of the domain name are (ideally) separate concerns.

If you have control over the DNS entries for the existing domain, and are willing to keep traffic coming to that same domain name, DNS redirects would be the easiest fix to the hosting problem. I doubt that salesforce will let you alias a *.force.com site to a non-salesforce ip address, so this would only be possible if you are already using a custom domain.

If you do want to change the domain that users are accessing, 301 HTTP redirects are probably your best option.

  • Yes, but how to set 301 HTTP redirect in salesforce? I tried to use URL Redirect with , like Awesome.TheBestWebsite.com but it didn't work - so URL Redirect works if you need to redirect one, specific address. – EvAzi Jul 25 '17 at 15:01
  • If you need to do the redirection in salesforce, I believe those redirect rules are your only option. If you have control over the domain though, you could do a DNS redirect to a different platform that is better able to return HTTP redirects for all pages. – martin Jul 25 '17 at 15:16

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.