# Check that public pages are accessible without authentication

- Check 03.18 · Crawling · Critical
- Source: https://checklist-seo-geo.com/en/crawling/check-that-public-pages-are-accessible-without-authentication
- Audit site-wide what a crawler without a session receives: HTTP codes, redirects to the login page, missing content, protected resources, and fix it.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/crawling/check-that-public-pages-are-accessible-without-authentication.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Crawlers browse without an account, without cookies and without a session. This check consists of verifying, for every URL you want crawled, that an anonymous request receives a 200 and the same main content as a logged-in visitor, with resources (CSS, JavaScript, images, APIs) that are also accessible without authentication. It complements the check [make public pages accessible without logging in](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/make-public-pages-accessible-without-logging), which deals with login walls and paywalls: here, the goal is a systematic check that can be repeated after every production release.

## Why it matters

Teams work while logged in. What they see is not what Googlebot receives, and the differences go unnoticed:

- **Redirect to `/login` or a 401 code** on a page that is supposed to be public: the crawler indexes nothing, or indexes the form.
- **Session-dependent content**: prices, stock levels, descriptions or navigation links shown only to members. For a crawler, the page is thin and the linked pages become orphans.
- **Protected resources**: an image subdomain or an API behind authentication. The page returns 200, but it renders empty or broken.
- **Forgotten protection**: a staging password left active, a “coming soon” mode, deployment protection extended to production.
- **Content loaded after a session check in JavaScript**: the initial HTML only contains a loading indicator. AI crawlers, which generally do not execute JavaScript, get nothing.

Google states that it does not use the content of URLs that return a 4xx code and that it removes from the index those that were indexed. A 401 or a 403 on a public page therefore makes it disappear.

## What it improves

- **Crawling and indexing**: every public page can be read by Googlebot, Bingbot and AI search crawlers.
- **Complete indexed content**: the search engine sees the same main content as your logged-in customers.
- **Rendering**: the resources needed for display no longer return 401 or 403.
- **Internal linking**: navigation links exist for anonymous visitors, and therefore for crawlers.
- **AI citations**: a necessary condition, never a sufficient one. An assistant can only cite what it receives without a session.

## How to check

**1. One URL, anonymously.** curl sends no cookies by default:

```bash
curl -s -o /tmp/page.html -w "%{http_code} -> %{redirect_url}\n" https://example.com/tarifs
grep -c "an exact sentence from the main content" /tmp/page.html
```

Compliant result: `200 ->` with no redirect, and a count greater than 0.

**2. The whole sitemap, anonymously.** This script lists the sitemap URLs that do not return 200 or that contain a password field:

```bash
#!/usr/bin/env bash
# Usage: ./acces-anonyme.sh https://example.com/sitemap.xml
curl -s "$1" | grep -o '<loc>[^<]*</loc>' | sed -e 's/<loc>//' -e 's/<\/loc>//' |
while read -r url; do
  resultat=$(curl -s -o /tmp/page.html -w '%{http_code} %{redirect_url}' "$url")
  code=${resultat%% *}
  cible=${resultat#* }
  mot_de_passe=$(grep -c -i 'type="password"' /tmp/page.html)
  if [ "$code" != "200" ] || [ "$mot_de_passe" -gt 0 ]; then
    printf '%s\t%s\tpassword:%s\t%s\n' "$code" "$cible" "$mot_de_passe" "$url"
  fi
done
```

For a sitemap index, run it on each child sitemap. Empty output is the expected result.

**3. Search Console.** The [Page indexing](https://search.google.com/search-console/index) report flags URLs “Blocked due to unauthorized request (401)” and “Blocked due to access forbidden (403)”. [URL Inspection](https://search.google.com/search-console?action=inspect), as a live test, shows the rendered HTML and the refused resources.

**4. Logged-in versus anonymous comparison.** Open the same page in a logged-in window and in a private browsing window. Compare the main heading, the text, the prices and the number of menu links. Any difference in the main content needs fixing.

## How to implement

### Step 1 — Define the public scope

List the templates and the expected access for each one. This table becomes your test reference:

| Template | Example URL | Expected access | Content that must be present anonymously |
| --- | --- | --- | --- |
| Product page | `/produits/chaise-chene` | public, 200 | name, description, price, availability |
| Documentation | `/docs/installation` | public, 200 | full text, code samples |
| Pricing | `/tarifs` | public, 200 | full price list |
| Blog post | `/blog/choisir-une-chaise` | public, 200 | full text |
| Customer account | `/compte` | private, 302 to `/connexion` | none |
| Dashboard | `/app` | private, 401 or 302 | none |

Anything private follows the check [protect private content with authentication](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/protect-private-content-authentication).

### Step 2 — Crawl the site without authentication

In Screaming Frog, make sure `Configuration > Authentication` contains no credentials, then start the crawl from the home page. Sort by response code and by redirect URL: all pages that end up on the login page appear grouped together. Then compare the number of pages found with the number in the sitemaps. A significant gap points to links that only exist for logged-in visitors.

### Step 3 — Check the resources

In Search Console URL Inspection, open the resources tab of the tested page. For each refused resource, test it anonymously:

```bash
curl -s -o /dev/null -w "%{http_code}\n" https://cdn.example.com/images/chaise-chene.webp
curl -s -o /dev/null -w "%{http_code}\n" https://api.example.com/v1/produits/chaise-chene
```

A public API called by public pages must respond without a token for the data displayed. Otherwise, render that data server-side in the HTML.

### Step 4 — Automate the check

Add the script from the “How to check” section to your continuous integration or to a scheduled job after each deployment, on a sample of URLs per template. The deployment should fail if a public URL does not return 200. See [test all versions after each deployment](https://checklist-seo-geo.com/en/multilingual-tracking-maintenance/test-all-versions-after-each-deployment).

### Apache

Versions: Apache 2.4.

Authentication set at the site level protects everything. Limit it to private paths:

```apache
<LocationMatch "^/(compte|app)/">
    AuthType Basic
    AuthName "Customer area"
    AuthUserFile /etc/apache2/.htpasswd
    Require valid-user
</LocationMatch>
```

Look for forgotten protections with `grep -rniE "AuthType|Require valid-user" /etc/apache2/ /var/www/example/`, then run `sudo apachectl configtest && sudo systemctl reload apache2`.

### Nginx

Versions: Nginx 1.18 and later.

If staging and production share a configuration, make sure `auth_basic` only appears in the staging `server` block. For a resource subdomain, no authentication should apply to files called by public pages:

```nginx
server {
    server_name cdn.example.com;
    root /var/www/cdn;
    auth_basic off;

    location /prive/ {
        auth_basic "Internal files";
        auth_basic_user_file /etc/nginx/.htpasswd;
    }
}
```

Reload with `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare Zero Trust dashboard, all plans, November 2026.

A Cloudflare Access application declared on the domain without a path protects the whole site. In `Zero Trust > Access controls > Applications` (formerly `Access > Applications`), check the domain and path of each application. For staging, declare the application on the `preprod.example.com` subdomain only.

### AWS

Versions: CloudFront, Elastic Load Balancing and Amplify Hosting consoles, November 2026.

- **CloudFront**: in each behavior of the [distribution](https://console.aws.amazon.com/cloudfront/v4/home), “Restrict viewer access” must be turned off for public paths, otherwise unsigned URLs return 403.
- **Application Load Balancer**: no listener rule should apply a Cognito or OIDC authentication action to the `/*` path.
- **Amplify Hosting**: a branch's password protection must not apply to the production branch.

### Vercel

Versions: Vercel dashboard, all plans, November 2026.

In the project settings, under “Deployment Protection”, the “Standard Protection” scope protects all deployments except production domains, which remain public. The “All Deployments” scope also puts the production domain behind authentication: reserve it for a site that has not launched yet.

### Netlify

Versions: Netlify dashboard, all plans, November 2026.

Check in `Project configuration > General > Visitor access` (“Password Protection” or “Project visibility” section, depending on the plan) that no password protection covers production, and that no `Basic-Auth` line in the `_headers` file applies to `/*`.

### WordPress

Versions: WordPress 6.0 to 7.1.

- Filter the list of pages and posts on the “Private” and “Password protected” statuses.
- Disable maintenance or “coming soon” plugins after launch.
- With a membership plugin, check the rules per content type: a global setting can restrict all posts to members.
- Make sure menus do not depend on being logged in: some themes and plugins display different links depending on the status.

### Shopify

Versions: Shopify, all plans, November 2026.

[`Online Store > Preferences`](https://help.shopify.com/en/manual/online-store/themes/password-page), store access section: as long as private mode (“Private mode”, the new name for password protection) is on, the whole store shows a password page. For a store reserved for professionals, keep public the pages you want crawled, and make sure the theme does not hide prices and descriptions from logged-out visitors if you want them indexed.

### Webflow

Versions: Webflow, paid site plans, November 2026.

`Site settings > General`, “Website password” section: protection must be turned off on the published site. Also check pages and folders that are protected individually.

### Wix

Versions: Wix Editor and Wix Studio, all plans, November 2026.

In each page's settings, the permissions section shows whether the page is restricted to members or password protected. A restricted page cannot be read by crawlers.

### Squarespace

Versions: Squarespace 7.1, all plans, November 2026.

`Settings > Site availability`: the site must be “Public”. The “Private” and “Password protected” options close it to crawlers. Also check pages that are protected individually.

### Laravel

Versions: Laravel 10 to 13.

List the routes and their middleware:

```bash
php artisan route:list -v --except-vendor
```

A public route must not carry `auth`. The `auth` middleware redirects anonymous visitors to the `login` route: a 302 that crawlers follow all the way to the form. For a partially personalized page, render the main content unconditionally and restrict only the personal blocks:

```html
<h1>{{ $product->name }}</h1>
<p>{{ $product->description }}</p>

@auth
    <x-prix-negocie :product="$product" />
@endauth
```

### Next.js

Versions: Next.js 15 and 16.

Limit the proxy `matcher` (the `proxy.ts` file since Next.js 16, `middleware.ts` before that) to private areas, and render public content server-side, without waiting for a session check in the browser:

```js
export const config = {
  matcher: ['/compte/:path*', '/app/:path*'],
};
```

A public page that reads the session to display a personal block must still render its main content for a visitor without a session.

## Common mistakes

- **Testing while logged in**: your session hides the problem. Test with curl or in private browsing.
- **Only checking the page**: an image subdomain or an API behind authentication breaks rendering without changing the page's HTTP code.
- **Restricting navigation links to members**: the linked pages become orphans for crawlers.
- **Showing prices only after login** on a consumer store: crawlers index product pages without prices, and AI assistants cannot compare them.
- **Extending deployment protection to production** after a test, then forgetting to remove it.
- **Checking only once**: a single deployment is enough to reintroduce a protection. Automate the test.

## Frequently asked questions

### How can I see what a crawler sees without being logged in?

Request the page with curl, which sends no cookies, and check the HTTP code, the absence of a redirect to the login page and the presence of a sentence from the main content. To see what Google receives, run the live test in Search Console URL Inspection: it shows the rendered HTML, the screenshot and the refused resources. Private browsing and a crawler without credentials complete the check.

### Can a members-only page be indexed?

No, a members-only page is not indexed as it stands: the crawler has no account and receives a redirect to the login page or a 401 or 403 code. Google does not use the content of 4xx URLs. To keep restricted content visible in search engines, serve a substantial public excerpt and, for Google, mark up the paywalled part with the structured data designed for subscription content.

### Should prices be shown to logged-out visitors?

On a consumer store, yes: a price reserved for account holders is invisible to search engine and AI assistant crawlers, which then index incomplete product pages. For a B2B store with negotiated rates, show at least an indicative public price or the pricing terms, and keep personalized prices for logged-in customers. Descriptive content must remain public in every case.

### What should I do if a CSS resource or an API returns 401 to crawlers?

A resource that returns 401 or 403 to crawlers breaks the page's rendering without changing its HTTP code. Make public the CSS, JavaScript and image files called by public pages, and let the API respond without a token for publicly displayed data. If the API must stay protected, render that data server-side, directly in the page's HTML.

## Resources

- [Google Search Central: How HTTP status codes affect crawling](https://developers.google.com/search/docs/crawling-indexing/http-network-errors)
- [Google Search Central: Subscription and paywalled content structured data](https://developers.google.com/search/docs/appearance/structured-data/paywalled-content)
- [Google Search Central: Understand JavaScript SEO basics](https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics)
- [Vercel: Deployment Protection](https://vercel.com/docs/deployment-protection)
- [Laravel: Authentication](https://laravel.com/docs/authentication)

Next steps: [protect staging and private data with authentication](https://checklist-seo-geo.com/en/indexing-canonicalization/protect-staging-private-data-authentication), [inspect the initial HTML](https://checklist-seo-geo.com/en/javascript-html-rendering/inspect-initial-html) and [check CDN, WAF and anti-bot protection](https://checklist-seo-geo.com/en/crawling/check-cdn-waf-anti-bot-protection).
