Free Hosting With a Custom Domain and HTTPS (2026 Guide)
Free hosting with a custom domain and free SSL: what's actually free, DNS records explained, and setup notes for GitHub Pages, Netlify, Vercel and Cloudflare.
6 min read

You can get free hosting with a custom domain on GitHub Pages, Netlify, Vercel and Cloudflare Pages, and all four issue free HTTPS certificates for that domain automatically. The one thing that isn't free is the domain name itself: you register it with a domain registrar for a yearly fee, then point its DNS records at your host.
This guide covers what's actually free, how the DNS records work, and host-specific notes for each of the four. If you haven't chosen a host yet, start with our guide to free web hosting for static pages.
Limits checked 14 October 2026 against each provider's official docs. Free plans change often; check the linked pages before you commit.
What's free and what isn't
| Part | Free? | Notes |
|---|---|---|
| Hosting the files | Yes | All four hosts have free plans for static sites |
| Default subdomain | Yes | Such as username.github.io or a .pages.dev address |
| Connecting a custom domain | Yes | Included on every free plan below |
| HTTPS certificate | Yes | Issued and renewed automatically |
| The domain name | No | Paid yearly to a registrar |
| DNS hosting | Usually | Most registrars include it; Cloudflare offers it too |
How do custom domains work on a static host?
Connecting a domain is a two-sided handshake. You tell the host which domain you want to use, and you add DNS records at your DNS provider that point that domain at the host. Once both sides agree, the host requests a certificate and starts serving HTTPS.
The order matters a little. Most hosts want the domain added in their dashboard first, then they show you the exact records to create.
Apex vs www: which DNS records do you need?
There are two kinds of hostname you might use:
- The apex (or root) domain, such as
example.com. - A subdomain, most often
www.example.com.
The record types differ because of a DNS rule: the apex can't have a standard CNAME record alongside the other records a domain needs.
| Record | What it does | Typically used for |
|---|---|---|
| CNAME | Points one hostname at another hostname | www and other subdomains |
| A / AAAA | Points a hostname at IPv4 / IPv6 addresses | The apex, when the host gives you IP addresses |
| ALIAS, ANAME or flattened CNAME | Behaves like a CNAME at the apex; the DNS provider resolves it to IPs | The apex, if your DNS provider supports it |
A common, robust setup is to use www with a CNAME and redirect the apex to it, or the other way round. Most hosts handle the redirect between the two once both are added. Always use the exact values your host's dashboard or docs give you, and allow time for DNS changes to propagate.
Per-host notes
GitHub Pages
GitHub Pages supports custom domains on public repositories with GitHub Free, and provides HTTPS through Let's Encrypt. For the apex, use the IP addresses listed in GitHub's custom domain docs, since they can change. For www, use a CNAME pointing at your username.github.io address.
Once the certificate is issued, tick Enforce HTTPS in the repository's Pages settings so HTTP visitors are redirected. GitHub's HTTPS docs explain what to do if the option is unavailable. Our guide to hosting a static website on GitHub Pages for free covers the whole setup.
Netlify
Custom domains with SSL are included on Netlify's Free plan. You can keep DNS at your registrar and add the records Netlify shows, or delegate DNS to Netlify. Bear in mind that the credit-based Free plan pauses all projects at 300 credits a month, and a custom domain doesn't change that.
Vercel
Vercel Hobby allows up to 50 domains per project and provides free HTTPS certificates. The dashboard tells you which record to add for the apex and for subdomains. Remember that Hobby is for non-commercial personal use only; see can I use free hosting for a commercial site.
Cloudflare Pages and Workers
Cloudflare Pages allows 100 custom domains per project with free HTTPS. Pages custom domains don't require Cloudflare nameservers, so you can keep DNS where it is for subdomains.
Workers is different. If you deploy with Workers static assets, which Cloudflare now recommends for new projects, custom domains require the domain's zone to use Cloudflare nameservers. Our Cloudflare Pages deploy guide walks through both.
Step by step: connect a custom domain
The flow is the same on every host, even though the screens differ.
Register the domain
Buy the domain from a registrar you trust, in your own name, and note where its DNS is managed.
Add the domain to your host
In your host's dashboard or repository settings, add the domain (and www if you want both). The host then shows the records it needs.
Create the DNS records
At your DNS provider, add the records the host asked for, and delete old records from any previous host.
Wait for verification and HTTPS
Once the records resolve, the host verifies the domain and issues a certificate. This can take from minutes to a few hours.
Force HTTPS and test
Turn on HTTPS redirects where the host offers a setting, then visit both the apex and www over http:// to check they redirect.
Custom domain limits compared
| Host | Custom domain on free plan | Free HTTPS | Domain limit | Notes |
|---|---|---|---|---|
| GitHub Pages | Yes (public repos) | Yes, Let's Encrypt | One site per repo | Tick Enforce HTTPS |
| Netlify | Yes | Yes | Not a stated constraint | Sites pause at 300 credits |
| Vercel | Yes | Yes | 50 per project | Non-commercial only on Hobby |
| Cloudflare Pages | Yes | Yes | 100 per project | Workers custom domains need Cloudflare nameservers |
Troubleshooting HTTPS on a custom domain
Most problems come down to DNS.
- Certificate not issued yet: the host can only issue a certificate after your records point at it. Check them, then wait.
- Conflicting records: an old A record or a leftover CNAME can send some visitors to the wrong place. Remove records from a previous host.
- Mixed content warnings: your pages load an image or script over
http://. Change those URLs tohttps://or relative paths. - Proxied DNS: if your DNS provider proxies traffic, the host may not be able to verify the domain. Follow the host's guidance for that provider.
Add a working contact form to your static site
A custom domain makes a site look professional, and a contact form is usually the next thing it needs. Static hosts serve files and can't process form POSTs (Netlify Forms on Netlify is the exception), so point your form's action at a FormSubmit endpoint and submissions arrive by email. The free plan includes 1 form and 50 submissions a month; add your custom domain to the form's allowlist so only your site can post to it. Start with an email form or the GitHub Pages contact form guide.


