GitHub Pages September 1, 2026 5 min read

How to Point a Devs.Surf Subdomain to GitHub Pages

A complete step-by-step guide to hosting your static site or portfolio on GitHub Pages using a free devs.surf subdomain with automated HTTPS.

Written by ByteLogic Team

GitHub Pages is one of the easiest and most reliable platforms for hosting static websites, portfolios, documentation, and frontend web applications. Pairing it with a free devs.surf subdomain gives your project a clean, professional address without paying yearly domain registration fees.

In this tutorial, we will configure your GitHub repository and Devs.Surf DNS so your custom subdomain points seamlessly to your GitHub Pages build with automatic Let's Encrypt SSL/TLS encryption.

Prerequisites

  • A GitHub repository with GitHub Pages enabled (under Settings → Pages).
  • A claimed subdomain on Devs.Surf (e.g. myproject.devs.surf).

Step 1: Add CNAME in GitHub Repository

There are two ways to tell GitHub Pages which domain to expect:

Method A: Through the Repository Settings

  1. Navigate to your repository on GitHub.
  2. Click on SettingsPages (in the left sidebar).
  3. Under Custom domain, type your full subdomain: myproject.devs.surf.
  4. Click Save.

Method B: Via a CNAME File

Create a file named CNAME (all uppercase, no file extension) in the root of your publishing branch (usually main or gh-pages), containing solely your domain name:

CNAME
myproject.devs.surf

Step 2: Add DNS Records in Devs.Surf

Now open your Devs.Surf Dashboard, locate your claimed domain, and click Manage DNS.

Because GitHub Pages uses CDN edges, you should point a CNAME record directly to GitHub's domain:

Type Name / Host Target / Content TTL
CNAME @ YOUR-USERNAME.github.io 3600

Note: Replace YOUR-USERNAME with your actual GitHub username or organization name. For example, if your username is johndoe, use johndoe.github.io.

Step 3: Verify and Enforce HTTPS

Once you click Add Record in Devs.Surf, our Anycast DNS immediately pushes the record to authoritative nameservers.

  1. Return to your GitHub repository under Settings → Pages.
  2. GitHub will automatically check the DNS record. It will show a checkmark: "DNS check successful".
  3. Check the box Enforce HTTPS. GitHub will request and install a Let's Encrypt certificate for your subdomain (usually takes 1-5 minutes).

Done! Visit https://myproject.devs.surf in your browser to see your live site with HTTPS secured.

READY TO USE THIS DOMAIN?

Grab a free devs.surf subdomain and connect it to your preferred host in under 60 seconds.

SEARCH FREE DOMAINS

RELATED_GUIDES