I have a vf page which I want my public site to display. The problem here is when I open the page it gives me "Authorization Required" error.

Now before you go ahead and vote down this question, here are a bunch of things I researched and did before posting it here.

1) I compared an old site setup for another client (where the vf page works) with the one I am doing now and the problem seems that the new setup has a different Site Type.

Site where vf pages work enter image description here

Current site where the vf page is not working enter image description here

2) I also checked the Public Access Settings for my non working site and it seems that all the required read access are there for custom objects being used in the site vf pages and their controllers.

3) The vf pages were also enabled for the site.

4) Another thing I noticed is that the working site has user license as Guest License, whereas the non working site has user license as Guest.

But when I am creating a site, it does not give me any option to choose the license type for the guest and just puts in Guest. From what I know Guest License and Guest are not the same.

How do I change the user license type for the site guest user? Or am I setting the site incorrectly?

I referred these links for site setup but it did not help me much: https://developer.salesforce.com/page/An_Introduction_to_Force.com_Sites https://help.salesforce.com/HTViewHelpDoc?id=sites_configuring_sites.htm&language=en_US

  • Did you add the VF pages to the site? Please check this link. developer.salesforce.com/page/… Commented Jun 26, 2014 at 2:53
  • Yes, I did. The site opens like: name.force.com/apex/Page?param=value1 Commented Jun 26, 2014 at 12:52
  • Can I ask you to create a simple page without any controller and add it to the Sites and check if it works. Simple Hello World page may be. Commented Jun 26, 2014 at 14:20
  • Ok I will try that and comment here if it works. Commented Jun 26, 2014 at 14:42
  • Ok so I replaced my vf page with a test page and it still gives me the same authorization error message Commented Jun 26, 2014 at 16:36

2 Answers 2


There's a question on here for how to get a debug on a SF site. That may help.

I'm guessing this is either a permission issue (object/field) or a apex error that throws the unauthorized error page.

Does your page have it's own custom controller?

  • Yes the page has its own custom controller. So you thing there is an error happening on the apex page that is throwing the authorize exception? Commented Jun 26, 2014 at 12:51
  • That's been a common thing for me. The error could be code/DML related, or might really be a permission thing somewhere. The debug will let you know where in your controller it might be. Commented Jun 26, 2014 at 13:21
  • I just tested the page in the org using standard salesforce way and it worked fine. Commented Jun 26, 2014 at 13:33
  • I replaced the vf page on site with a simple hello world vf page without any controller but it still gives the same error. Commented Jun 27, 2014 at 14:59

These are the steps that you needed to check before you test VF pages in SITE .

  1. Check Object Level Permission (Whatever object you are using in the VF page , make sure they have the required persmissions enabled).
  2. The next thing is FIELD Level Permissions (whatever field is displayed on the page needs to have read/edit permissions based on their usage).
  3. The next thing is Record Type Settings. (If the object has any record types assigned, make sure that is marked as default record type for you to view it on Sites).
  4. Add the VF page and Apex class in Enabled VisualForce Pages and Enabled Apex Classes.

If the VF page does not appear on site even now , it might be due to sharing issues. Create appropriate sharing rules for the object which you want to view. Hope this will resolve your issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .