Skip to content

Commit 8b42742

Browse files
authored
Update preview deployments docs to inform about x-robots-tag (cloudflare#25498)
1 parent cbc81de commit 8b42742

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/content/docs/pages/configuration/preview-deployments.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,19 @@ Branch name aliases are lowercased and non-alphanumeric characters are replaced
6767
To view branch aliases within your Pages project, select **View build** for any preview deployment. **Deployment details** will display all aliases associated with that deployment.
6868

6969
You can attach a Preview alias to a custom domain by [adding a custom domain to a branch](https://developers.cloudflare.com/pages/how-to/custom-branch-aliases/).
70+
71+
## Preview indexing by search engines
72+
73+
To maintain a healthy SEO profile, it's vital to prevent search engines from finding duplicate content across the web. Because preview deployments are designed to be an exact replica of your production environment, they inherently create this exact situation. Cloudflare Pages by default ensures your search rankings are not harmed by these temporary previews.
74+
75+
### X-Robots-Tag: noindex on Preview Deployments
76+
By default, every preview deployment generated by Cloudflare Pages includes the X-Robots-Tag: noindex HTTP response header. This header acts as a clear directive to search engine crawlers, instructing them to disregard the page and not include it in their search results.
77+
78+
You can easily confirm that your preview deployments are correctly configured to block indexing. Run the following curl command in your terminal, replacing the placeholder with your unique preview URL:
79+
80+
```
81+
curl -I https://<your-preview-url>.pages.dev
82+
```
83+
84+
Inspect the output for the x-robots-tag: noindex line to verify that your preview site is not being indexed.
85+

0 commit comments

Comments
 (0)