1

I used to host my webpage on username.github.io.

I have now set up a new webpage on username.com, and has no relation to username.github.io.

However, I want to redirect username.github.io to username.com.
As of now, if somebody enters username.github.io, it takes you to the 404 not found page.

Is there anyway I can reroute it to username.com?

TylerH
  • 20,799
  • 66
  • 75
  • 101
SidV
  • 45
  • 4

1 Answers1

0

Instead of a redirect, the normal process is for your current GitHub pages to use a custom domain

You find a better illustration of that process here

  • Go to your GitHub Pages site’s repository settings.
    Under “Custom domain”, add or remove your custom domain and click “Save”.
  • Setting “custom domain” creates a file named CNAME in the same repository.
    Don’t delete it.

The OP sidv adds in the comments:

After setting up my website (deployed elsewhere) and the DNS servers, I was unable to open the webpage on Safari and Firefox (only on Chrome).

Finding the load balancing IP and configuring it as an A record ended up redirecting the webpage appropriately.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks @VonC! This was really helpful. The resources here helped solve **another** issue I was facing. For anyone who might face a similar predicament in the future -- after setting up my website (deployed elsewhere) and the DNS servers, I was unable to open the webpage on Safari and Firefox (only on Chrome). Finding the load balancing IP and configuring it as an A record (found in @VonC's link) ended up redirecting the webpage appropriately. – SidV Aug 31 '20 at 13:27
  • @SidV Well done! I have included your comment in the answer for more visibility. – VonC Aug 31 '20 at 13:30