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
neeraj87neeraj87 Authorization Required error for a simple Hello World page

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
Site where vf pages work

Current site where the vf page is not working
User-added image

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:

PS: Ok so I replaced my vf page with a test page and it still gives me the same authorization error message
Have you checked field level security for the guest profile - they need to have read access for any field that appears in the page.

Failing that - try clicking on the 'Preview as Admin' link - if there is an error occuring, this will display it rather than just giving you an authorization required error.

If that doesn't help, can you post the page/controller source - any errors that occur will result in the auth required page, as the underlying platform error page requires you to be logged in to see it.