Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 Hosting webspace using GitHub with custom domain, Is this possible?

views
     
TSMatQuasar
post Oct 31 2023, 03:56 PM, updated 3y ago

Casual
***
Validating
329 posts

Joined: Jun 2023
I see two examples:

https://github.com/binarygolf/binarygolf.github.io --> https://binary.golf

https://github.com/angch/angch.github.io --> https://angch.com

How they do it? I see there is CNAME file.

Does that mean next time we don't need to pay expensive hosting fee, just register a custom domain, and somehow point to GitHub????
TSMatQuasar
post Oct 31 2023, 04:18 PM

Casual
***
Validating
329 posts

Joined: Jun 2023
QUOTE(cytyler @ Oct 31 2023, 04:13 PM)
ChatGPT:

Here's a simplified step-by-step guide on how to do it:

Create a GitHub Repository: First, create a GitHub repository for your website. The repository name should be in the format <username>.github.io, where <username> is your GitHub username. This will make your website accessible at https://<username>.github.io.

Add Your Website Files: Add your website's HTML, CSS, JavaScript, or any other relevant files to the repository. You can also use a static site generator like Jekyll if you prefer.

Create a CNAME File: To associate a custom domain with your GitHub Pages site, create a CNAME file in the root of your repository. The CNAME file should contain your custom domain name (e.g., example.com or www.example.com).

Set Up Domain Configuration: Next, you'll need to configure your domain registrar to point to GitHub's servers. This involves setting up DNS records. You generally need to create two records: an A record pointing to GitHub's IP addresses and a CNAME record that points to <username>.github.io.

GitHub Repository Settings: In your GitHub repository, go to the "Settings" tab. Scroll down to the "GitHub Pages" section. There, you can select the custom domain you want to use. It may take a little time for DNS changes to propagate.

Secure Your Site (Optional): You can also enable HTTPS for your custom domain by using a service like Cloudflare or GitHub's built-in HTTPS support. This is important for security and SEO.
*
Thanks mate for your answer from ChatGPT.... now I just need to find out GitHub's IP address.

 

Change to:
| Lo-Fi Version
0.0135sec    0.54    7 queries    GZIP Disabled
Time is now: 22nd December 2025 - 05:52 PM