Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1376 Unify robots file #1405

Merged

Conversation

radoslavzeman
Copy link
Contributor

@radoslavzeman radoslavzeman commented Feb 28, 2025

Description

Implement robots file according to OLO/Marianum.

Testing

Visit /robots.txt, you should be redirected to /api/robots and see robots file according to NEXT_PUBLIC_DEPLOYMENT variable.
For all non-prod:

      User-Agent: *
      Disallow: /

For prod:

        User-agent: *
        Disallow: /api/

Notes

I changed also env vars to have the same approach in projects from NEXT_PUBLIC_IS_STAGING to NEXT_PUBLIC_DEPLOYMENT.
Other changes in envs are just reorder to have the same order in all files to be able to check them easily.

@radoslavzeman radoslavzeman linked an issue Feb 28, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Feb 28, 2025

Test build pipeline info 🚀

Changes in the code and tag info:

➡️ Changes in strapi: false

➡️ Changes in next: true

We are going to build 🚢

🔜 next

🥳 Bratiska-cli successfully built an image from path: next/

Copy link
Contributor

@Ty-ci Ty-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 nice!

@github-actions github-actions bot added pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review and removed pr: needs review 🙏 labels Feb 28, 2025
@radoslavzeman radoslavzeman merged commit 39b390c into master Feb 28, 2025
11 checks passed
@radoslavzeman radoslavzeman deleted the 1376-allow-robots-to-crawl-only-on-prod-environment branch February 28, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow robots to crawl only on Prod environment
2 participants