# How to set up Website Structure

> Find your main website sections and scan a useful mix of pages from each one.

Author: OptinStack Team  
Published: 2026-07-12  
Page: https://community.optinstack.com/articles/how-to-set-up-website-structure  
Markdown: https://community.optinstack.com/llms.md/articles/how-to-set-up-website-structure

Website Structure finds the main sections of your website and helps OptinStack scan a useful mix of pages from each one\. This prevents one large section, such as a blog or product catalog, from taking over the scan\.

> **Info:** Saved changes apply to scans started after the new Website Structure revision is saved. A running or completed scan is never changed retroactively.

## Pages discovered

Open a domain in the dashboard and choose Website Structure\. OptinStack discovers pages automatically, then suggests groups for the main sections it finds\.

- OptinStack checks configured sitemaps, declarations in `robots.txt`, and the default `/sitemap.xml`\.
- When no usable sitemap exists, OptinStack follows same\-site links within safety limits\.
- Tracking query parameters and fragments are removed before duplicate pages are counted\.
- Subdomains remain separate and must be added as their own domains\.
- The discovery summary tells you when a source failed, discovery was truncated, or only links were available\.

> **Warning:** For very large websites, discovery uses a deterministic sample across sitemap and path sections. The dashboard reports partial discovery instead of implying every page was loaded.

## Page groups

A page group is a section such as product pages, blog posts, documentation, or localized landing pages\. OptinStack suggests groups automatically\. You can accept them as they are, rename or remove them, or add a missing group\.

### Path rules

- An exact path such as `/pricing` matches only that page\.
- A recursive path such as `/products/**` matches `/products` and every page below it\.
- Advanced exclusions remove a smaller section from a broad group\.

If groups overlap, the most specific rule wins\. Exact paths win over recursive paths, then the longest recursive prefix wins\. The preview lists overlaps and affected examples so assignment is never based on the visual order of the cards\.

> **Tip:** Only exact paths and recursive section paths are supported. Unsupported wildcard patterns are rejected before they can affect a scan.

## How pages are selected

By default, OptinStack selects up to five stable pages from each group\. This automatic sample is recommended for most websites because pages in one section usually share the same layout and tracking setup\.

- Standard behavior: sample up to five pages from the group\. No choice is required\.
- Advanced option: turn on Scan every page only when pages in that group genuinely differ\. The project scan limit still applies\.

OptinStack always respects the project scan limit\. The homepage and useful pages from each group are prioritized, and pages outside a group can still be selected when space remains\.

## Preview and save

1. Choose Preview scan after reviewing the suggested groups\.
1. Fix any highlighted path rules\.
1. Save the structure\. Future scans will use the new page mix\.

## Keeping the structure current

Choose Check again after a sitemap or site architecture change\. Manual groups and the Scan every page option are preserved while suggestions and page counts are refreshed\.

## Common website examples

- Ecommerce: use `/products/**` for the catalog\. Keep the standard sample unless individual product pages load meaningfully different tools\.
- Documentation: use `/docs/**` and let OptinStack sample the section\.
- Localized sites: create locale\-specific groups such as `/en/**` and `/fr/**` when locales load different tools; otherwise group the shared content section\.
- Dynamic applications: group stable public routes\. Query\-string variants remain separate only when the query is meaningful after normalization\.
- No sitemap: review the link\-based discovery warning and add manual groups for sections that are not linked from the homepage\.

## Troubleshooting

- No pages found: confirm the site is publicly reachable, `robots.txt` is not blocking access, and a sitemap URL returns valid XML\.
- Foreign\-host entries: add the subdomain as a separate OptinStack domain instead of mixing it into this structure\.
- A group shows zero pages: update its exact or recursive path rule, or keep it only if the route will be published later\.
- Partial coverage: turn off Scan every page for large groups or increase the project scan allowance\.

## Removing Website Structure

Removing the configuration does not delete scan results or website pages\. Future scans return to automatic page selection\. The dashboard asks for confirmation because coverage can change\.
