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
Amjad OmarAmjad Omar 

Exposing a visual force holding salesforce articles publicly (to none salesforce users) ?

1 - How can I expose a visual force page that is showing our salesforce article publicly (to none salesforce users).
2 - How can i customize the url of this site to show my domain name instead of salesforce's domain.
JayantJayant
1. You will need to have a Force.com unauthenticated site configured and expose this VF page on that site. Remember you should also select Public Knowledge Base in Channels on the Article (can be done from Article Management tab).
2. You will need to create Custom Redirects (Setup -> Domain Management -> Custom URLs).
Amjad OmarAmjad Omar
1 - Do we have to grant the public user profile access to articles and article types?
2 - Can you elaborate more on the 2nd point...I want the visual force page URL to be www.mydomain.com/xyz for example; is this doable?
JayantJayant
1. Yes you should provide Read access on Article Types to guest profiles. Also, you need to set the FLS on Article Types if you have certain fields you don't want to show to guests.
2. Try listing the domain under - Setup -> Domain Management -> Domains and then creating a Custom URL under 
Setup -> Domain Management -> Custom URLs. This may take up to 24 hours to start working.

In new Custom URL -
1. You will select a domain added in 2 above. This may be 'mydomain.com'.
2. Give a path like '/xyz'.
3. Select the Force.com Site to browse when a user enters this in address bar.

e.g. If site name is MyCustomSite then if I provide https://mydomain.com/xyz in address bar, I will be taken to the landing page of MyCustomSite.

I am not sure if any config is required with your Domain Name provider as well but you may give it a try first. If it does not work, you may require to modify the DNS entries at your Domain Provider/host like adding a new CNAME record (hopefully this is not required).


You may use the same VF pages on all channels like Internal, Partner Portal, Customer and Public Knowledge Base. Same Knowledge Article Version SOQL query used on same VF page exposed on different channels will return different results based on Channel selection on individual articles.

 
JayantJayant
You may also embed a VF page exposed on public site in another webpage (e.g. in an iFrame in your Corporate site etc.). So the URL is definitely doable.
Amjad OmarAmjad Omar
Jayant,

First of all thanks for your help.

First step is accomplished; i was able to expose the site publicly.

Regarding your instructions for the 2nd point; does the solutiuon/suggestion you provided keep my own domain name in the URL or it redirects it and change it to the force.com site URL?
JayantJayant
It will keep your own domain name. When you open the path you specify, you are taken to landing page of Site.
Going forward your pages should be linked via relative URLs on the VF page so the domain would remain same unless you explicitly provide an absolute URL.

 
JayantJayant
If this is resolved, please do mark the question as Resolved and the most appropriate/helpful answer as the best answer :).
If none of the answers helped you significantly, please post the solution. You may also mark your solution as the best answer.