Skip to content

Clean up redirects to cut down on Google Search Console issues - #971

Merged
Scotchester merged 3 commits into
mainfrom
fix/redirect-cleanup
Sep 3, 2026
Merged

Clean up redirects to cut down on Google Search Console issues#971
Scotchester merged 3 commits into
mainfrom
fix/redirect-cleanup

Conversation

@Scotchester

@Scotchester Scotchester commented Sep 3, 2026

Copy link
Copy Markdown
Member

Part of cal-itp/calitp.org#577


  • Adds trailing slash to existing redirect destinations
  • Adds wildcards to certain redirects to catch .html extensions

Other previous URLs with HTML extensions are handled automatically by Netlify's Pretty URLs feature because the path is the same, just without the .html now.

Testing instructions

  1. With the Network panel open, visit https://www.camobilitymarketplace.org/contact and observe two 301s: one to go to /get-support add a second to add the trailing slash.
  2. Try the same with the preview deploy for this PR at https://deploy-preview-971--cal-itp-mobility-marketplace.netlify.app/contact and observe only one redirect.
  3. Confirm the following URLs 404 in production:
  4. Confirm that their counterparts on the preview deploy redirect correctly:

@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for cal-itp-mobility-marketplace ready!

Name Link
🔨 Latest commit 63cd54e
🔍 Latest deploy log https://app.netlify.com/projects/cal-itp-mobility-marketplace/deploys/6a9997ecea342000083630e4
😎 Deploy Preview https://deploy-preview-971--cal-itp-mobility-marketplace.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@Scotchester Scotchester changed the title Fix/redirect cleanup Clean up redirects to cut down on Google Search Console issues Sep 3, 2026
Other previous URLs with HTML extensions are handled automatically by Netlify's Pretty URLs feature (see: https://answers.netlify.com/t/support-guide-how-can-i-alter-trailing-slash-behaviour-in-my-urls-will-enabling-pretty-urls-help/) because the path is the same, just without the .html now.
We actually have a page at /about.
@Scotchester
Scotchester marked this pull request as ready for review September 3, 2026 15:59
@Scotchester
Scotchester requested a review from a team as a code owner September 3, 2026 15:59

@jgravois jgravois left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice sleuthin @Scotchester 🧹

@Scotchester
Scotchester merged commit 2ffa7f9 into main Sep 3, 2026
6 checks passed
@Scotchester
Scotchester deleted the fix/redirect-cleanup branch September 3, 2026 17:22
@Scotchester

Copy link
Copy Markdown
Member Author

Replicated the testing procedures on production post-deployment and all work as expected!

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