-
Notifications
You must be signed in to change notification settings - Fork 556
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
Update some US edition navlinks so that they don't redirect #27062
Conversation
This is a temporary change requested by the SEO team in the US. It's part of a larger work to redesign the navbar so that it doesn't contain links that redirect: guardian/dotcom-rendering#11193. Until we complete this the team has asked us to update only the following links: These URLs in the US subnav -- https://www.theguardian.com/business https://www.theguardian.com/environment https://www.theguardian.com/soccer https://www.theguardian.com/technology https://www.theguardian.com/wellness Updated to their /us/ versions -- https://www.theguardian.com/us/business https://www.theguardian.com/us/environment https://www.theguardian.com/us/soccer https://www.theguardian.com/us/technology https://www.theguardian.com/us/wellness
Co-authored-by: Ioanna Kokkini <[email protected]>
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.
🔗
Seen on FRONTS-PROD, ADMIN-PROD (created by @ioannakok and merged by @arelra 16 minutes and 11 seconds ago)
|
Yes its a good idea to enforce this behaviour. Currently the nav is generated server side by Frontend and the existing tests check that the nav links are as expected from the implementation logic. A complexity is that not all nav links redirect to their 'editionalised' pages (eg. https://www.theguardian.com/science), which would mean a script would have to know which links need to be redirected. I assume by script you mean an integration/e2e test? |
Ah yes I see now yes you're right. We can warn/fail if there is a redirect as we want to move to a situation where there aren't any for a particular edition. |
Yes, from my testing the trick is to pass the await fetch('https://www.theguardian.com/business', { headers: { "Cookie": "GU_EDITION=US" } })
.then(r => r.url) // "https://www.theguardian.com/us/business"
await fetch('https://www.theguardian.com/business', { headers: { "Cookie": "GU_EDITION=UK" } })
.then(r => r.url) // "https://www.theguardian.com/uk/business"
await fetch('https://www.theguardian.com/business', { headers: { "Cookie": "GU_EDITION=AU" } })
.then(r => r.url) // "https://www.theguardian.com/au/business" |
Closes guardian/dotcom-rendering#11192
What does this change
These URLs in the US subnav --
https://www.theguardian.com/business
https://www.theguardian.com/environment
https://www.theguardian.com/soccer
https://www.theguardian.com/technology
https://www.theguardian.com/wellness
Updated to their /us/ versions --
https://www.theguardian.com/us/business
https://www.theguardian.com/us/environment
https://www.theguardian.com/us/soccer
https://www.theguardian.com/us/technology
https://www.theguardian.com/us/wellness
Why?
This is a temporary change requested by the SEO team in the US. It's part of a larger work to improve SEO. In the future we would like to make changes to the navbar so that it doesn't contain links that redirect:
Until we complete this the team has asked us to update only the links above.
For more details see SEO analysis here
Screenshots
Previously we were redirecting:
After the change we won't:
Checklist