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

No robots.txt in production site #533

Open
dweggyness opened this issue Jan 19, 2022 · 0 comments
Open

No robots.txt in production site #533

dweggyness opened this issue Jan 19, 2022 · 0 comments

Comments

@dweggyness
Copy link
Member

https://thegazelle.org/robots.txt returns HTML Status 500 on the production site. It is supposed to return HTML status 200 along with a valid robots.txt. Issue was first noticed when running Google Lighthouse on the site, and it complained that the site does not have a robots.txt.

Expected Behavior

Current Behavior

Currently, the code has mechanisms in place for displaying a robots.txt for the admin panel (disallow all ), and displaying a robots.txt for the staging site ( disallow all ) as we want neither of those to be indexed on Google. However there is no mechanism in place for the production site as the robots.txt is added as a route in a conditional (ifStaging() is true), thus there is no robots.txt for the main site.

Possible Solution

Add an additional conditional check to the server routes, and add a GET route for robots.txt ifProduction() is true. Robots.txt should allow crawling so that our site can properly be indexed by any search engines that obey robots.txt

Steps to Reproduce (for bugs)

  1. First step
  2. Second step
  3. Third step
  4. Fourth step
dweggyness added a commit that referenced this issue Jan 19, 2022
dweggyness added a commit that referenced this issue Jan 19, 2022
merge master into stable for #533-fix-robotstxt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant