Skip to content

fix(nginx): noindex preview hostnames at the edge#2569

Merged
vladfrangu merged 2 commits into
preview-robots-canonicalfrom
preview-noindex-header
May 25, 2026
Merged

fix(nginx): noindex preview hostnames at the edge#2569
vladfrangu merged 2 commits into
preview-robots-canonicalfrom
preview-noindex-header

Conversation

@vladfrangu
Copy link
Copy Markdown
Member

Adds a server-level X-Robots-Tag: noindex, nofollow, noarchive header to the preview hostname server block (*.preview.docs.apify.com) so search engines stop indexing preview URLs — including the SDK/Client/CLI paths that proxy_pass to apify.github.io and have no preview bucket to clean up. Complements the canonical-rewrite plugin from #2566, which only covers paths served from the apify-docs build.

The always flag keeps the header on 4xx/5xx so error pages aren't indexed either. Production docs.apify.com is unaffected (separate server block).

Preview hostnames proxy SDK/Client/CLI paths straight to
apify.github.io, so they serve production content even after the
apify-docs preview S3 bucket is cleaned up. A `site:preview.docs.apify.com`
search currently returns dozens of these URLs. Add a server-level
`X-Robots-Tag` header so every response under a preview hostname --
including upstream proxies, error pages, and future routes -- tells
search engines not to index, follow, or archive it.
@github-actions github-actions Bot added this to the 141st sprint - Tooling team milestone May 25, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label May 25, 2026
@apify-service-account
Copy link
Copy Markdown
Contributor

apify-service-account commented May 25, 2026

🗑️ Preview for this PR was deleted.

@vladfrangu vladfrangu changed the base branch from master to preview-robots-canonical May 25, 2026 17:39
@vladfrangu vladfrangu merged commit c3175b5 into preview-robots-canonical May 25, 2026
12 checks passed
@vladfrangu vladfrangu deleted the preview-noindex-header branch May 25, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants