1

User has a custom url for sites but it is not working.

For Example:

Create one Custom Domain 'mydomain.org' in salesforce sandbox.

Create a new force.com site 'myIdeas' and assigned default home page as'Registration'. Create new Custom URL for this site with the above domain (mydomain.org) and path '/reg'.

When previewing or testing the myIdeas site Custom URL, user doesn't see the custom url as 'http://mydomain.org/reg/Registration' instead it shows up as http://mydomain.org/reg/sites/servlet.SiteDebugMode?sitedebugmode=z&rand=85651. Why is the custom url not showing up correctly? See below screenshot:

enter image description here

How to make the url 'http://mydomain.org/reg/Registration' is accessible.

Can any one have any thoughts on this.

Thanks,

  • Salesforce custom domain setup is little bit tricky. So please post your steps as answers so that it will help others in future. – Saroj Bera Aug 17 '15 at 14:50
2

First of all you can not test Custom Domain in Sandbox environment. You have to do it in production org only. Also note that custom root domains (e.g. http://mydomain.org) can not be added in Salesforce. You can only add sub-domains like http://www.mydomain.org. The main steps are as follows.

  1. First create a CNAME record for www.mydomain.org as www.mydomain.org.orgid18.live.siteforce.com in your DNS server.
  2. After the CNAME is created in DNS server, add the domain in your org Setup > Domain Management > Domains > "Add a domain".
  3. After adding the domain go to Setup > Develop > Sites. Open your site in edit mode by clicking on Site Label. Add "New Custom URL" by selecting http://www.mydomain.org from the list.

The details steps are given in this link. Hope this helps.

| improve this answer | |
1

I think the issue may begin with where you "assigned default home page as 'Registration'". See the following Help page on Adding a Custom URL where it says the following.

Once you’ve added domains to the Domain Management page, you can select your domain and site relationships by creating a custom URL. A custom URL consists of the domain and a custom path. The same path name can be used on more than one domain, but it can't be used more than once within the same domain. When adding a custom URL, the / is required and indicates the root. You can add an additional path after the /, but you must at least use the / to indicate the root.

and

If you want to set a preferred custom URL for authenticated pages and emails that links back to the site or community, then select Site Primary Custom URL. This is only available on the root path for Force.com and Communities sites and not available at all on Site.com sites.

As you mention "Registration", that suggests to me you may be creating a secure site, in which case the URL should begin with https not http which could be contributing to the problem that you're having.

As you have a servlet that appears on that page, at some point you may need to know about the URLRewriter Interface that helps you display user-friendly URLs and links to site visitors.

A reference you may find helpful to you is the Force.com Sites Implementation Guide.

| improve this answer | |

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.