function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
slaneslane 

Odd problem with URL redirect

Hello all:

 

I've built a custom Force.com site for a customer. He was wanting to use a custom URL, but some conflicts with third-party App Exchange software so far have prevented this. Regardless, he wants his custom URL to forward/redirect to the site.

 

The custom domain is www.cbresa.com. The Site address is cbresa.force.com. He has configured a C record for www.cbresa.com, pointing to cbresa.force.com, via his ISP (GoDaddy). I've used nslookup to confirm that this record seems to be pointed correctly.

 

The problem occurs when I enter www.cbresa.com in my browser address bar. I end up at https://na6.salesforce.com. Spying on the traffic I can see this occurs via 302 redirect. I can't see whether that is coming from GoDaddy or from SFDC.

 

However, when I enter plain old cbresa.com into my browser, I do end up in the right place -- cbresa.force.com. THis happens via a couple funky 302 redirects (first to cbresa.com/?cf72abf0m then back to cbresa.com/), and finally a real 301 redirect. Oh, and if I put in http://cbresa.com/ with the trailing slash, I get the 301 redirect right away with the odd 302s in there.

 

Anway, mind-numbing HTTP detail aside, what are we doing wrong? Do we need to create a different type of DNS record on the ISP side? Do something on the SFDC side? Host a page on his ISP that forces the right redirect?

 

All thoughts welcome.

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

Steve,

 

in this case you don't need to do any cname you just need to use 301 forwarding provided by your domain name provider.

here is the link to the how to document for Godady

All Answers

BulentBulent

Steve,

 

you need to update the customer web address field of your site

update the field with your custom domain name (www.cbresa.com) 

 

 

slaneslane

Bulent -- Thanks for the quick reply. I'm not sure this works, though. I believe we need the custom URL to disappear. We don't want to use it, we just want it to redirect to cbresa.force.com.

 

If the custom URL sticks around, it breaks some functionality later, where we have some third-party software that calls back to salesforce. It calls back to https://cbresa.force.com via an iframe, and if the parent page is on www.cbresa.com, the authentication does not cross domains and the iframe requires authentication (you helped us troubleshoot this a bit earlier).

 

The behavior I think we're looking for is a 301 redirect from www.cbresa.com to cbresa.force.com. Is this possible, and is there anything we need to do on the SFDC side to make it happen? Or am I thinking about this the wrong way (quite possible)?

 

-- Steve

BulentBulent

Steve,

 

in this case you don't need to do any cname you just need to use 301 forwarding provided by your domain name provider.

here is the link to the how to document for Godady

This was selected as the best answer
slaneslane
Aah, good. So we're on the right track as far as being able to configure it all from the ISP side. Many, many thanks.