Skip to content

Pages source files fetched from wrong location #23849

Answered by yoannchaudet
Ka-Repo asked this question in General
Pages source files fetched from wrong location #23849
Sep 27, 2021 · 2 answers

Hey guys,

when I serve my website without Custom Domain everything works fine. When I add a custom domain the network requests for the source files go to that website, while the files are still hostet on github? The page remains empty.

CNAME file contains the custom domain name. DNS points to github ip adress (185.199.108.153) using A Record. My hoster only provides the option of setting 1 A-Record, could this be a problem or are multiple A-Records just used as fallback?

Appreciate the help :slight_smile:

Hello @Ka-Repo and welcome here,

Setting a custom domain on your Pages site usually also changes the routing logic for your site.

In your specific example you went from https://ka-repo.github.io/metaplex to https://example.com.

You will want to update your site so resources are fetched at the root (/) of your site instead of under /metaplex.

I hope it helps,

Replies

2 suggested answers

Hello @Ka-Repo and welcome here,

Setting a custom domain on your Pages site usually also changes the routing logic for your site.

In your specific example you went from https://ka-repo.github.io/metaplex to https://example.com.

You will want to update your site so resources are fetched at the root (/) of your site instead of under /metaplex.

I hope it helps,

0 replies
Answer selected

Hi @yoannchaudet,
thanks for the reply!

EDIT: You saved my day. Had some prefix in my deploy command in my package.json.

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet
2 participants