GitHub Pages
How to set up a GitHub Pages website and point your owns.it.com subdomain towards it.
Setting up GitHub Pages with an owns.it.com subdomain
This guide will walk you through the process of setting up a GitHub Pages site and pointing your owns.it.com subdomain to it.
Creating a GitHub Pages repository
First, you’ll need to create a site on GitHub Pages:
- Go to the GitHub Pages Getting Started Guide
- Follow the instructions to create your site
- Note down your GitHub Pages URL (it will be in the format
github-username.github.io
)
Creating the domain file
Create a JSON file inside domains directory (domains/subdomain.json
) with the following content and submit a pull request:
Replace:
github-username
with your GitHub usernamegithub-repository
with your repository name[email protected]
with your email address
Configuring GitHub Pages
After your pull request is merged:
- Go to your GitHub Pages repository
- Navigate to Settings > Pages
- Under Custom domain, enter your owns.it.com subdomain (e.g.,
subdomain.owns.it.com
) - Check the Enforce HTTPS checkbox
- Wait for the changes to take effect
Verifying your owns.it.com Subdomain
GitHub requires domain verification for enhanced security. Here’s how to verify your domain:
Get your verification string
- Go to GitHub and click your profile icon at the top right
- Click Settings
- Click Pages
- Click Add a domain
- Enter your owns.it.com subdomain (e.g.,
myname.owns.it.com
) - Click Add domain
- Copy both the hostname and verification string
Create the verification file
Create a JSON file inside the domains directory (domains/hostname.subdomain.json
) using the hostname you copied and your subdomain, with the following content:
Replace:
github-username
with your GitHub username[email protected]
with your email addressgithub-verification-string
with the verification string from GitHub
Complete verification
After your pull request is merged:
- Return to GitHub’s domain verification page
- Click the Verify button
Your website should be live!
After completing all steps and your pull request has been merged, your website should be accessible at your owns.it.com subdomain. The process may take a few minutes for DNS changes to propagate.
Troubleshooting
If your site isn’t working:
- Check that your domain files are correctly formatted
- Verify that the CNAME record points to your GitHub Pages domain
- Confirm that the TXT record matches the verification string exactly
- Make sure the custom domain is set in your repository’s Pages settings
- Wait for DNS changes to propagate (this can take up to 24 hours)
- Check that HTTPS is enforced in your GitHub Pages settings