GitHub pagees works just for one site

Hi. I have repository https://github.com/stasmotorny/stasmotorny.github.io I set a custom domain frontdev.pp.ua for this repository.
This site works fine, but I can’t run all other my sites. Instead of them I see a start page of frontdev.pp.ua for example you can try this link https://stasmotorny.github.io/photographer/
Here is my domain dns settigs.

Is it possible to fix this problem?

This is happening because you’ve got a service worker installed for the site hosted from your stasmotorny/stasmotorny.github.io repository.

When you add a custom domain to a repository using the *.github.io naming scheme this custom domain applies to all sites hosted from your account.

When the service worker is installed it will capture all traffic to sites hosted from the same domain frontdev.pp.ua and redirect it to the root index page of your site. As all Pages sites from your account are now hosted from this domain all visits to your other site are being redirected to the site hosted from stasmotorny/stasmotorny.github.io.

There are 2 options for how to fix this:

  1. Disable the service worker for the site hosted in stasmotorny/stasmotorny.github.io. You’ll need to look up how to do this in the React documentation and commit that change to your repository.

  2. Rename your stasmotorny/stasmotorny.github.io repository to something other than the *.github.io naming scheme to make your other sites not inherit this domain. This will stop visits to your other site from redirecting to the root index, but it will mean the URLs of these sites will be changed from frontdev.pp.ua/repository-name.

1 Like