Skip to content

[hot fix] redirects#16754

Merged
wackerow merged 15 commits into
masterfrom
hot-fix-redirects
Dec 3, 2025
Merged

[hot fix] redirects#16754
wackerow merged 15 commits into
masterfrom
hot-fix-redirects

Conversation

@wackerow
Copy link
Copy Markdown
Member

@wackerow wackerow commented Dec 1, 2025

Description

  • Fixes several broken redirects related to locale handling
  • Refactors all existing redirects to use next.config.js
  • Adds lowercasing logic within Next.js middleware
  • Removes /public/_redirects and all Netlify handling of redirects
  • Adds some additional redirects to handle edge cases spotted within Google Search Console, e.g., /ethereum.html, usage of /content/, /how
  • Fixes custom locale redirects (/no -> /nb and /ph -> /fil)

Preview link examples

http://deploy-preview-16754--ethereumorg.netlify.app/

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 1, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 97f545d
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69306cc52e26a60008bda4ed
😎 Deploy Preview https://deploy-preview-16754--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 42 (🔴 down 14 from production)
Accessibility: 94 (no change from production)
Best Practices: 92 (🔴 down 7 from production)
SEO: 91 (🔴 down 8 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread public/_redirects Outdated
Comment thread public/_redirects Outdated
Comment thread public/_redirects Outdated
@wackerow wackerow marked this pull request as ready for review December 2, 2025 22:55
@corwintines corwintines self-assigned this Dec 3, 2025
corwintines
corwintines previously approved these changes Dec 3, 2025
Copy link
Copy Markdown
Member

@corwintines corwintines left a comment

Choose a reason for hiding this comment

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

LGTM

Tested a bunch of redirects in the list, and the new locale ones as well.

revert middleware updates
@github-actions github-actions Bot added the config ⚙️ Changes to configuration files label Dec 3, 2025
Copy link
Copy Markdown
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

@wackerow great job! the redirects are working well. I left a few comments about some rules that differ from the previous setup.

One more thing to double-check regarding SEO impact: the redirect status code. We're currently using 308, but I'm wondering if we should consider a 301 instead. cc @mnelsonBT

Comment thread next.config.js Outdated
Comment thread public/_redirects
Comment thread public/_redirects
Comment thread next.config.js Outdated
@mnelsonBT
Copy link
Copy Markdown
Contributor

mnelsonBT commented Dec 3, 2025

@wackerow great job! the redirects are working well. I left a few comments about some rules that differ from the previous setup.

One more thing to double-check regarding SEO impact: the redirect status code. We're currently using 308, but I'm wondering if we should consider a 301 instead. cc @mnelsonBT

Touched on this in standup @pettinarip @wackerow but I looked into it further and want to follow up on this tag to confirm.
Recommended choices:

  • Use 301 for all permanent content page redirects (if possible - not a strong SEO issue if it has to be 308 (see below))
  • Use 302 for the /fil/ and /pcm/ locale deprecation redirects (we will revisit these as part of larger language convo, and switch to 301 if we are permanently removing the languages)

Context:
From a SEO perspective:

  • Client-side redirects = bad (search engine sees it as a weak signal and/or it doesn't carry over to indexing)
  • 301 or 308 redirects = best choices for permanent redirect (tells search engine to permanently save redirect)
  • 302 = only use for temporary redirects (search engine will effectively stash the original page in the index, which is a waste of crawl budget if the redirect is actually permanent)

Within that:

  • 301 = has universal compatibility, but can't pass 'post' requests (for a form, API, etc)
  • 308 = only compatible with modern browsers (http/1.1) but can pass "post" data for APIs, forms, e-commerce checkout etc.
  • 301 is recommended for content pages because they don't need any post data requests to carry over, and 301 has universal compatibility (in the case that someone has a very old browser)

Copy link
Copy Markdown
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

LGTM! gj

@wackerow wackerow merged commit e09fcff into master Dec 3, 2025
12 of 13 checks passed
@wackerow wackerow deleted the hot-fix-redirects branch December 3, 2025 19:37
This was referenced Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config ⚙️ Changes to configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants