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

chore(robots): disallow NLB crawler from parsing beyond the application bundle #1134

Merged
merged 3 commits into from
Jan 19, 2021

Conversation

LoneRifle
Copy link
Contributor

Keep crawlers away from bundle.js as there are no real links in here

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

Since Go is a React single-page app, disallowing bundle.js effectively means that the crawler is blind and can't even see the landing page at all. Is this what we want?

How about if we only allow loading the landing page, but disallow all other server routes, including /api and redirect endpoints?

From what I can see loading Go in Chrome Devtools, this should work:

user-agent: <NLB crawler>

allow: /
allow: /bundle.js$
allow: /css2
allow: /assets/*
allow: /s/*.woff2$
disallow: *

@liangyuanruo liangyuanruo changed the title chore(robots): disallow parsing bundle.js chore(robots): disallow NLB crawler from parsing beyond the application bundle Jan 19, 2021
@LoneRifle LoneRifle merged commit 8a7c3d8 into develop Jan 19, 2021
@LoneRifle LoneRifle deleted the chore/robots/no-bundle branch January 19, 2021 08:15
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

Successfully merging this pull request may close these issues.

2 participants