GitHub Pages What to write in custom domain?

267 Views Asked by At

Custom domain enter image description here custom domains allow you to serve your site from a domain other than akshitmodhiya.github.io.

what to write in it as "https://akshitmodhiya.github.io/xypo" not working

2

There are 2 best solutions below

0
Artaza Sameen On

To use Custom Domain in Github Pages. You need to own your own domain name.

In order to use /xypo in your github domain . Create a folder named xypo in your repository and place all the web files there.

0
jskrnqwerty On

It appears that you haven't built and deployed your application on GitHub Pages yet.

After you do that, a section stating, "Your site is live at https://akshitmodhiya.github.io/xypo" appears under "GitHub Pages".

After deployment to GitHub Pages, you need to:

Step 1 - purchase a domain, akshitmodhiya.com from GoDaddy for example.

Step 2 - configure new domain's DNS settings in GoDaddy.

Step 3 - add 5 records. They are as follows: DNS records configuration setting screenshot

Step 4 - wait between 5 minutes and 24 hours while the DNS settings take effect.

Step 5 - come back to your GitHub repo's GitHub Pages section, add akshitmodhiya.com as Custom domain and click on Save.

Step 6 - look up under GitHub Pages and notice now it states, "Your site is live at https://akshitmodhiya.com".

Step 7 (Bonus) - Every time you make changes to repo, re-build and re-deploy the application, the live site URL will reset to https://akshitmodhiya.github.io/xypo. To fix this, you need to enter akshitmodhiya.com in Custom domain and click Save, every time.

And there you go, your application Xypo has its own custom domain.

I haven't found a permanent solution to the issue mentioned in Step 7, yet. When I do, I will update my answer here.

Reference: