---
schema_version: "1"
id: 36a212c98c9915c8a1e670817a9fa894b062e789aa384e2041c24a1e5928cc41
title: site:previewAsAdmin
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/salesforce-pages-developers-guide/guides/pages/components/pages-compref-site-previewasadmin.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-pages-developers-guide/guide/pages-compref-site-previewasadmin.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 590545392d8ca7229e438b5b5c00cd480c437148cff74391dfc10941ef30d141
products:
  - Visualforce Developer Guide
  - Platform Developer Content
---

# site:previewAsAdmin

This component shows detailed error messages on a site in administrator preview mode. We recommend that you add it right before the closing apex:page tag. 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 error message twice.

## Example

```apex

  	<!-- We recommend adding this component right before your closing apex:page tag. -->
	<site:previewAsAdmin/>
```

The example above renders the following HTML:

```html

<span id="j_id0:j_id50">
<span id="j_id0:j_id50:j_id51:j_id52"> 
<div style="border-color:#FF9900; border-style:solid; border-width:1px; 
padding:5px 0px 5px 6px; background-color:#FFFFCC; font-size:10pt; 
margin-right:210px; margin-left:210px; margin-top:25px;">
	<table cellpadding="0" cellspacing="0"> 
	<tbody><tr> 
		<td><img src="/img/sites/warning.png" height="40" 
		style="padding:5px;margin:0px;" width="40" /></td> 
		<td> <strong><ul id="j_id0:j_id50:j_id51:msgs3" 
			style="margin:5px;"><li>Page not found:test </li></ul>
		</strong>
		<a href="/sites/servlet.SiteDebugMode?logout=1" 
		style="padding:40px;margin:15px;">Logout of Administrator Preview Mode</a>
		</td> 
	</tr> </tbody> 
	</table> 
</div>
</span>
</span>

```

## Attributes

|Attribute Name|Attribute Type|Description|Required?|API Version|Access|
|--------------|--------------|-----------|---------|-----------|------|
|`id`|String|An identifier that allows the component to be referenced by other components in the page.| |14.0|global|
|`rendered`|Boolean|A Boolean value that specifies whether the component is rendered on the page. If not specified, this value defaults to true.| |14.0|global|

