Search code examples
reactjsdnsgithub-pages

404 on asset retrieval: React App Deployed on Github Pages with Custom Domain


I have deployed my react app (created with CRA) to github pages. I have the gh-branch, and everything works fine when deployed without the custom domain.

It seem as if it hits the custom domain fine, and then cannot return the build items. I've searched online and can't find a solution to this specific example.

As soon as i remove the custom domain it all works fine again.

React scripts:

react scripts

Any help / tips deeply appreciated


Solution

  • I fixed this by updating my "homepage" package.json url to the custom domain.