Problems with my hostinger custom domain when applying to my github repository #126052
Unanswered
LPAgustin
asked this question in
New to GitHub
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been facing this problem for days now. My github repository works perfectly fine with the free domain that github provides, but when I change it to a custom domain that I've purchased from Hostinger, it doesn't work anymore. It's a vite react static website that, as I said, it works fine as a normal hosted repo, but when I change it's domain to my own one, it just turns into a blank page. When I check the console for errors I'm getting these 404 errors:
`index-Dc0WFiu1.js:1
Failed to load resource: the server responded with a status of 404 ()
index-BvVXP-pY.css:1
Failed to load resource: the server responded with a status of 404 ()
index-BvVXP-pY.css:1
Failed to load resource: the server responded with a status of 404 ()`
I can't seem to find the source of this problem, when I check the assets, those "missing" files are there.
he missing files are located inside the assets folder.
Now the records were also configured correctly, I've followed every step:
Configured a CNAME targeting my github profile.
Configured four A records targeting at all four IP addresses that github provides for connecting a custom domain
After following those 2 steps, my website just stops working (my domain is also already propagated worldwide, so that's not the issue either).
All my build configuration files are working correctly. I don't think it's something that has to do with my domain failing, since the vite app works fine under the free domain github provides me. But here they are if you want to see them just in case:
`vite.config.js
`import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: "/sax-deployment/",
})
`
package.json
{ "name": "urbanstrings", "private": false, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { "emailjs-com": "^3.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-just-parallax": "^3.1.16", "react-modal": "^3.16.1", "react-router-dom": "^6.22.3", "scroll-lock": "^2.1.5" }, "devDependencies": { "@types/react": "^18.2.66", "@types/react-dom": "^18.2.22", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.19", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.6", "postcss": "^8.4.38", "tailwindcss": "^3.4.3", "vite": "^5.2.0" } }
main.js
`import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.jsx' import './index.css' import { BrowserRouter as Router } from 'react-router-dom'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
</React.StrictMode>,
)
`
I hope someone sees the issue cause I'm not being able to. Thanks very much in advance.
Beta Was this translation helpful? Give feedback.
All reactions