Skip to content
FormSubmit
Static hosting

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.

FormSubmit Team

6 min read

DNS records connecting a custom domain to a free static host with an HTTPS padlock

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

PartFree?Notes
Hosting the filesYesAll four hosts have free plans for static sites
Default subdomainYesSuch as username.github.io or a .pages.dev address
Connecting a custom domainYesIncluded on every free plan below
HTTPS certificateYesIssued and renewed automatically
The domain nameNoPaid yearly to a registrar
DNS hostingUsuallyMost 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.

RecordWhat it doesTypically used for
CNAMEPoints one hostname at another hostnamewww and other subdomains
A / AAAAPoints a hostname at IPv4 / IPv6 addressesThe apex, when the host gives you IP addresses
ALIAS, ANAME or flattened CNAMEBehaves like a CNAME at the apex; the DNS provider resolves it to IPsThe 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

HostCustom domain on free planFree HTTPSDomain limitNotes
GitHub PagesYes (public repos)Yes, Let's EncryptOne site per repoTick Enforce HTTPS
NetlifyYesYesNot a stated constraintSites pause at 300 credits
VercelYesYes50 per projectNon-commercial only on Hobby
Cloudflare PagesYesYes100 per projectWorkers 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 to https:// 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.

Frequently asked questions

Can I get free hosting with a custom domain?

Yes. GitHub Pages, Netlify, Vercel and Cloudflare Pages all let you connect a custom domain on their free plans and issue an HTTPS certificate for it at no cost. You still need to register the domain itself, which costs money each year.

Is SSL free on static hosts?

Yes. All four major free static hosts provide HTTPS certificates for custom domains automatically. GitHub Pages uses Let's Encrypt and has an Enforce HTTPS setting to redirect HTTP traffic.

Can I get a custom domain for free?

Not a real one you control long term. Registering a domain costs money each year. Be wary of free domain offers that come with conditions, lock you into a host, or make it hard to transfer the domain away.

Why is Enforce HTTPS greyed out on GitHub Pages?

GitHub needs to issue a certificate for your domain first, which can take a while after DNS is configured correctly. Check your DNS records against GitHub's custom domain docs and wait for the certificate to be provisioned.

Should I use the apex domain or www?

Either works. Many sites use both, with one redirecting to the other. The www subdomain can use a simple CNAME record, while the apex usually needs A records or an ALIAS, ANAME or flattened CNAME record, depending on your DNS provider.

Do I need to move my nameservers to Cloudflare?

Not necessarily for Cloudflare Pages: Cloudflare says Pages custom domains don't require Cloudflare nameservers, so a subdomain such as www can point at Pages while DNS stays elsewhere. Custom domains on Cloudflare Workers do require the domain's zone to use Cloudflare nameservers.

Keep reading

Your form backend is 60 seconds away

Sign up with Google or email, create a form, paste the endpoint. Free forever for small sites — no credit card.