---
schema_version: "1"
id: f9a8c0ad66fdb3c4c90b0baee1a1556c3e020f80c7b5d49cd9bacba74c4515c2
title: Use Administrator Preview Mode to Troubleshoot Salesforce Sites
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/sites_admin_preview.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.sites_admin_preview.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 2f1f8be24820af3935713ffad8809eb53c6b731364497ce75cdb17b5a2e02b5f
description: If you see errors on site pages and you can't determine the cause, use administrator preview mode to look at them in context and in greater detail.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Use Administrator Preview Mode to Troubleshoot Salesforce Sites

If you see errors on site pages and you can't determine the cause, use administrator preview mode to look at them in context and in greater detail.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Developer</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d202131e72">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d202131e72 ">To create and edit Salesforce Sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d202131e72 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note Administrator preview mode is available for all active sites, including those with a [branded custom Web address](https://help.salesforce.com/s/articleView?id=platform.sites_overview.htm&release=264.0.0&type=5 "Salesforce Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization—without requiring users to log in with a username and password. You can publicly expose any information stored in your organization through a branded URL of your choice. And you can make the site's pages match the look and feel of your company’s brand.").

To access administrator preview mode:

1. From Setup, enter Sites in the Quick Find box, then select **Sites**.
2. Click the name of the site you want to preview.
3. In the Site Detail section, click the **Preview as Admin** link. A new browser window opens with a preview of your site, and the enhanced error message appears at the bottom of the page.
4. Click **Logout of Administrator Preview Mode** to clear the administrator cookie and be redirected to the site's home page.

The detailed error messages in administrator preview mode are driven by the `<site:previewAsAdmin />` component in your Visualforce error pages. Starting with Summer '10, new organizations include the `<site:previewAsAdmin />` component by default in [standard error pages](https://help.salesforce.com/s/articleView?id=platform.sites_error_pages.htm&release=264.0.0&type=5 "Salesforce sites use Visualforce pages for site and error pages. Sample error pages use the SiteSamples static resource for their style sheet and images."). You must add the component manually to all custom error pages and pages from older organizations. We recommend that you add it right before the closing `</apex:page>` tag, like this:

```
    <site:previewAsAdmin />
</apex:page>
```

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note The `<site:previewAsAdmin />` component contains the `<apex:messages />` tag, so if you have that tag elsewhere on your error pages, you will see the detailed error message twice.

#### See Also

- [Create and Edit Salesforce Sites](https://help.salesforce.com/s/articleView?id=platform.sites_creating_and_editing_sites.htm&release=264.0.0&type=5 "After you enable Salesforce Sites, create a Salesforce Site. Or, update an existing site.")