How to Add a Custom Domain to GitHub Pages (Hostinger Edition) Sidharth Mohanty on July 04, 2023 I recently finished my portfolio website, and it was a dream come true to have a small space of my own on the internet. To make this happen, I boug... Read full post Submit Preview Dismiss Collapse Expand Ismail Ismail Ismail Follow Joined Apr 11, 2024 • Apr 11 '24 Dropdown menu Copy link Hide For this step Step 3: Create two new CNAME records, how about if my website url in GitHub pages is username. github.io/reponame Should the record point to username. github.io/reponame then or just username. github.io Collapse Expand Sidharth Mohanty Sidharth Mohanty Sidharth Mohanty Follow Software engineer at Builder.io Location Cuttack, Odisha, India Work Software Engineer at Builder.io Joined Jun 19, 2021 • Apr 15 '24 Dropdown menu Copy link Hide I've not tried it, but I think it should be username.github.io/reponame if reponame is not == username.github.io/reponame Collapse Expand Ismail Ismail Ismail Follow Joined Apr 11, 2024 • Apr 15 '24 Dropdown menu Copy link Hide Thank you but I already solved it. DNS CNAME records are designed to point to domain names, not to specific paths or URLs within a domain. In this case: username.github.io What I did to solve this is updating my package.json file (my website is a React app). I updated this: "homepage": "username.github.io/reponame/", to "homepage": "https://my_custom_domain.com/", Adlee Afif Adlee Afif Adlee Afif Follow Joined Apr 16, 2024 • Apr 16 '24 Dropdown menu Copy link Hide hey just wondering, aside from the updating the package.json, what did you set for the DNS setting in the Hostinger? Is it the same with the post? Thanks! Collapse Expand Lucksinia Lucksinia Lucksinia Follow Joined Mar 19, 2023 • Dec 7 '23 Dropdown menu Copy link Hide Hostinger is salty when I'm trying to add more then one IP... Nothing to worry about? Genuine question here. Collapse Expand Octavio Frangipani Octavio Frangipani Octavio Frangipani Follow Junior Webdev Full Stack specialized in MERN Education Self-taught Work Worksut - startup Joined Jan 12, 2022 • Jan 8 '24 Dropdown menu Copy link Hide Same for me! But added them anyway Collapse Expand Richard Lima Ribeiro Richard Lima Ribeiro Richard Lima Ribeiro Follow Joined Feb 13, 2023 • Jan 10 '24 Dropdown menu Copy link Hide Thanks! It works very well!👌 Collapse Expand Jean Michell Jean Michell Jean Michell Follow Front-end developer interested in learning JS. specially ES6 and modern frameworks. Location Fortaleza Work Web Developer / UI Designer at HP (Atlântico) Joined Nov 22, 2019 • Sep 30 '23 Dropdown menu Copy link Hide sweet! :) thank you. just added mine: copycommands.com Collapse Expand Sidharth Mohanty Sidharth Mohanty Sidharth Mohanty Follow Software engineer at Builder.io Location Cuttack, Odisha, India Work Software Engineer at Builder.io Joined Jun 19, 2021 • Oct 20 '23 Dropdown menu Copy link Hide Wow! Looks awesome and helpful! Collapse Expand pyotrleya pyotrleya pyotrleya Follow Joined Feb 5, 2024 • Feb 5 '24 Dropdown menu Copy link Hide are there any changes to the nameservers Hostinger uses or do I leave them as is? Collapse Expand Sidharth Mohanty Sidharth Mohanty Sidharth Mohanty Follow Software engineer at Builder.io Location Cuttack, Odisha, India Work Software Engineer at Builder.io Joined Jun 19, 2021 • Feb 7 '24 Dropdown menu Copy link Hide I think if you're using Hostinger as the provider, you can leave them as it is Code of Conduct • Report abuse
For this step Step 3: Create two new CNAME records, how about if my website url in GitHub pages is
username. github.io/reponameShould the record point to
username. github.io/reponamethen or justusername. github.ioI've not tried it, but I think it should be
username.github.io/reponameif reponame is not ==username.github.io/reponameThank you but I already solved it.
What I did to solve this is updating my package.json file (my website is a React app).
I updated this:
"homepage": "username.github.io/reponame/",to
"homepage": "https://my_custom_domain.com/",hey just wondering, aside from the updating the package.json, what did you set for the DNS setting in the Hostinger? Is it the same with the post? Thanks!
Hostinger is salty when I'm trying to add more then one IP... Nothing to worry about? Genuine question here.
Same for me! But added them anyway
Thanks! It works very well!👌
sweet! :) thank you.
just added mine: copycommands.com
Wow! Looks awesome and helpful!
are there any changes to the nameservers Hostinger uses or do I leave them as is?
I think if you're using Hostinger as the provider, you can leave them as it is