-
Notifications
You must be signed in to change notification settings - Fork 12
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
Don't let Cubic payment URLs get indexed by Google during test phase #1758
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slice function logic needs reworking. Reach out if you need more clarity or to pair
if @conn.request_path == "/charlie" || String.slice(@conn.request_path, 0..4) == "/charlie/" do %> | ||
<meta name="robots" content="noindex, nofollow"> | ||
<% end %> | ||
<%= # hide any page in /policies/terms-use-charlie directory from search engines | ||
if @conn.request_path == "/policies/terms-use-charlie" || String.slice(@conn.request_path, 0..4) == "/policies/terms-use-charlie/" do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both of these slice
calls need to be changed. The function as written will return String.slice("/charlie/", 0..4)
-> /char
and String.slice("/policies/terms-use-charlie/", 0..4)
-> /poli
. This will fail to match on the desired string
apps/site/assets/static/robots.txt
Outdated
@@ -8,3 +8,7 @@ Disallow: /search?* | |||
Disallow: /*?*preview*&vid=* | |||
Disallow: /schedules/*/line?*date* | |||
Disallow: /org/* | |||
Disallow: /charlie/* | |||
Disallow: /policies/terms-use-charlie/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The urls we wish to not index with this pattern looks like there is no final slash. I believe it should be /policies/terms-use-charlie*
This might need to be double checked with the robots.txt
documentation.
Also this needs to be updated in the app.html.eex
file to not include the final slash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the slash got removed in the /policies/terms-use-charlie
the count in slice needs to go down as well
Summary of changes
Asana Ticket: Don't let Cubic payment URLs get indexed by Google during test phase
update robots.txt to stop urls from being indexed
General checks
New UI, or substantial UI changes
New endpoints, or non-trivial changes to current endpoints