# Guest User Sharing Rules (Public Sites Only)
**Use when** the user explicitly wants to make the site **public** (accessible to unauthenticated visitors). If the site is private/login-required, guest sharing rules are not needed.
If sharingRules metadata is not available locally in force-app/main/default/sharingRules, retrieve it from the org before creating new rules.
## Retrieve Full SharingRules Schema
Use the metadata MCP tool with metadataType "SharingRules" to retrieve schema.
## XML Example
```xml
ShareAccountsWithSiteGuestReadfalse[site Guest User's CommunityNickanme]NamenotEqualnull
```
## Critical Requirements
1. **SharedTo Element**: Must use `{site Guest User's CommunityNickanme}` (not URL path prefix).
2. **includeHVUOwnedRecords**: Required field. Set to `false` unless records owned by high-volume site users should be included.
3. **One XML file per object**: Put all rules for a given object in one file. Do not create additional.
## Common Mistakes
- Using `` or `` instead of `` in sharedTo
- Omitting the required `includeHVUOwnedRecords` field
- Using `includeRecordsOwnedByAll` (that's for `sharingCriteriaRules`, not guest rules)