Skip to content

Navigation Error: External URLs being treated as internal paths causing 404 #39296

Open
@LordAizen1

Description

@LordAizen1

Preliminary Checks

Description

While browsing the Gatsby website, I discovered an error in the browser console when links to Netlify are clicked. The website is incorrectly treating external Netlify URLs as internal paths, which causes a failed network request and a 404 error.

Reproduction Link

https://www.gatsbyjs.com/

Steps to Reproduce

  1. Visit https://www.gatsbyjs.com/
  2. Open the browser console (F12)
  3. Click on any link that points to app.netlify.com
  4. Observe the 404 error in the console

Expected Result

External links to sites like Netlify should open in a new tab or navigate away from the site directly without generating any page-data.json requests.

Image

Actual Result

The site attempts to load a page-data.json file for what it thinks is an internal route, resulting in this error:
GET https://www.gatsbyjs.com/page-data/https://app.netlify.com/page-data.json net::ERR_ABORTED 404 (Not Found)

Environment

- Browser: Microsoft Edge Version 136.0.3240.50
- OS: Windows 11 Home

Config Flags

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: triage neededIssue or pull request that need to be triaged and assigned to a reviewertype: bugAn issue or pull request relating to a bug in Gatsby

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions