Connecting a custom domain to free hosting is usually straightforward once you know which records matter, where to make changes, and what to verify before you switch traffic. This guide gives you a reusable checklist for attaching a domain to a free website hosting platform, whether you are publishing a static site, a landing page, a portfolio, or a small business site. It covers the practical sequence: confirm what your host supports, add the right DNS records, wait through propagation, enable SSL, and test both the apex domain and subdomains so you do not end up with a half-working launch.
Overview
If you want to connect a custom domain to free hosting, think of the job as two systems meeting in the middle:
- Your domain registrar or DNS provider controls where the domain points.
- Your hosting provider decides which DNS records it expects before it will serve your site.
The most common setup uses one or more of these records:
- A record: points a domain to an IPv4 address.
- AAAA record: points a domain to an IPv6 address if supported.
- CNAME record: points one hostname to another hostname.
- TXT record: often used for domain verification.
- CNAME flattening or ALIAS: sometimes used by DNS providers when the root domain needs to behave like a CNAME.
In practical terms, free cloud hosting platforms usually ask you to do one of three things:
- Point a subdomain like
www.example.comto a hostname they provide using a CNAME. - Point the apex domain like
example.comto one or more IP addresses using A records. - Add a verification record before SSL and routing are activated.
Before you change anything, gather these inputs:
- The exact domain you want to use: apex,
www, or both. - The DNS instructions from your host, copied exactly.
- Whether your host supports custom domains on its free tier.
- Whether the host provides managed SSL automatically after domain verification.
- Whether your DNS is managed at the registrar or at a separate DNS provider.
If you are still comparing platforms, it helps to review which free plans support SSL and custom domains before you commit. See Free Website Hosting Comparison: Storage, Bandwidth, SSL, and Custom Domain Support.
A simple rule: do not start by changing nameservers unless the provider explicitly requires it. Most of the time, you only need to edit a few DNS records, not hand over your whole DNS zone.
Checklist by scenario
Use the scenario that matches your setup. The sequence matters more than speed.
Scenario 1: Connecting a subdomain to free hosting
This is often the easiest and least risky option. You keep the main domain unchanged and point a hostname like site.example.com or www.example.com to your free hosting provider.
- Add the domain in your hosting dashboard. Many platforms generate a target hostname only after you register the domain inside the project or site settings.
- Copy the required CNAME target exactly. Do not guess. One missing character can break verification.
- Create the CNAME record in DNS. Example: host
wwwpoints to the provider hostname. - Remove conflicting records for the same hostname. A hostname should not have both a CNAME and other record types where they conflict.
- Wait for propagation. Some changes are visible quickly; others take longer depending on TTL and resolver caching.
- Verify the domain in your host. Many platforms check DNS before issuing SSL.
- Test HTTP and HTTPS. Confirm redirects work and the certificate is valid.
This scenario works well for brochure sites, creator pages, documentation sites, and demo projects. Related reading: Best Free Hosting for Developer Portfolios, Docs, and Demo Projects.
Scenario 2: Connecting the apex domain to free hosting
The apex domain is the bare root, such as example.com. This is where people often get stuck because standard DNS rules treat apex records differently than subdomains.
- Check what your host supports for the root domain. Some ask for A records. Others rely on ALIAS, ANAME, or flattening handled by your DNS provider.
- Add the apex domain in the hosting dashboard first. This ensures the provider knows to expect requests for that domain.
- Create the required A or equivalent records. If multiple IP addresses are listed, enter all of them.
- Do not leave old A records in place. Mixed destination IPs can send traffic to the wrong server.
- Optionally add a redirect plan for www. Many sites use both
example.comandwww.example.com, with one chosen as canonical. - Verify SSL after the DNS resolves correctly. Certificate issuance may fail if records are wrong or incomplete.
If your DNS provider supports CNAME flattening or ALIAS records at the root, you may be able to use a hostname target instead of hard-coded IP addresses. That can make future hosting changes easier, but it depends on the provider. Treat this as a provider-specific feature, not a universal rule.
Scenario 3: Connecting both apex and www cleanly
This is the best default setup for most public sites because it catches traffic regardless of how visitors type the address.
- Decide which version is primary. Pick either
example.comorwww.example.com. - Configure DNS for both hostnames. Usually the apex gets A records and
wwwgets a CNAME, though exact instructions vary. - Enable redirects in the hosting platform. The non-primary version should redirect to the primary version.
- Confirm SSL covers both names. A certificate for one hostname does not automatically guarantee the other if it was never added.
- Test canonical behavior. Open both versions in a fresh browser session and confirm they land on the same final URL.
This matters for crawl consistency, analytics, and user trust. If SEO is part of your launch criteria, also review Best Hosting for SEO: What Actually Matters for Site Speed and Crawlability.
Scenario 4: Moving an existing live domain to free hosting
This scenario requires more care because mistakes can take down a working site, mail flow, or both.
- Export or document your current DNS zone first. Take screenshots or save the record list.
- Identify non-web records you must preserve. MX, SPF, DKIM, DMARC, verification TXT records, and API-related subdomains are easy to overlook.
- Lower TTL in advance if possible. If you control the records early enough, a lower TTL can make the final switch more predictable.
- Add the new host records without deleting unrelated services. Website DNS changes should not break email or other apps.
- Test on the host-provided preview URL first. Make sure the site is complete before pointing the domain.
- Switch during a lower-risk window. Even a simple DNS change can expose config problems you did not see on preview URLs.
If you are publishing from a repository-based workflow, this pairs well with How to Deploy a Website Online From GitHub for Free.
Scenario 5: Connecting a domain to a simple website builder or landing page host
Many no-code and low-code platforms smooth out the hosting side, but the DNS principles stay the same.
- Publish the site first. Some builders do not activate domain settings until a project is live.
- Follow the builder's exact DNS template. Website builder platforms often use verification records in addition to routing records.
- Check whether forms, analytics, and redirects work on the custom domain. Preview domains may behave differently.
- Verify favicon, open graph image, and canonical settings. Branding errors often surface only after the custom domain is attached.
For broader planning, see Best Website Builders for One-Page Business Websites and WordPress Hosting vs Website Builders for Small Business Sites.
What to double-check
Most domain connection problems are not complex. They are usually mismatches, leftovers, or timing issues. Use this checklist before you assume the provider is failing.
1. You edited the right DNS zone
It is common to buy a domain at one company, delegate DNS to another, and then accidentally edit the wrong dashboard. Check the authoritative nameservers first, then edit records only where the live zone is actually hosted.
2. The record name is correct
DNS interfaces differ. Some want www, some want the full hostname, and some automatically append the domain. If you enter www.example.com in a system that already appends example.com, you can accidentally create www.example.com.example.com.
3. There are no conflicting records
A CNAME for www should not sit beside other incompatible records for www. Likewise, old A records at the apex can keep sending traffic to a previous host.
4. SSL is issued for every hostname you care about
Do not assume HTTPS is complete just because one version loads. Test:
http://example.comhttps://example.comhttp://www.example.comhttps://www.example.com
All four should resolve to the expected final destination with a valid certificate where applicable.
5. Redirects behave the way you intend
Your hosting provider, CDN layer, and application can each apply redirects. Make sure you do not create chains such as HTTP to HTTPS to www to trailing slash adjustments, especially if a simpler path exists.
6. Email records are untouched
When people say they "pointed the domain to hosting," they sometimes mean they replaced the entire zone or changed nameservers without migrating MX and TXT records. That can interrupt mail delivery. Website routing and email routing are separate concerns.
7. TTL and propagation expectations are realistic
Propagation is not one global event that finishes at a single moment. Different resolvers refresh at different times. If one device still shows the old site, test from another network before making more changes.
8. The free hosting plan actually permits the setup
Some free hosting platforms support preview domains but limit custom domain features, SSL behavior, bandwidth, or redirects. If you are designing a long-term business site, compare the free tier against your likely next step: Cloud Hosting Pricing Explained: What Free, Cheap, and Scalable Really Mean.
Common mistakes
These are the issues that repeatedly slow down otherwise simple launches.
Changing nameservers when only a record change was needed
Moving nameservers is a bigger operation than editing a few records. It can be correct, but it should be deliberate. If the host only asked for an A record and a CNAME, do that instead of migrating the whole zone.
Forgetting the www version
Many users type www by habit, and some browsers or old links may still reference it. If you only configure the apex, part of your audience may hit an error or an insecure route.
Assuming the site is broken before propagation finishes
Repeatedly changing records during propagation can make diagnosis harder. Make one clean change, wait, then test methodically.
Leaving stale verification or parking records in place
Domains that were previously parked, connected to another builder, or used for an old CDN may still contain records that interfere with the new host. Clean up only after you understand what each record is doing.
Ignoring canonical and redirect consistency
A site that loads on multiple hostnames without a clear redirect and canonical pattern can create messy analytics and indexing signals. Pick a preferred hostname and enforce it.
Breaking related services on subdomains
You may have docs, api, mail, or verification subdomains in active use. Before deleting anything, map what belongs to the website and what belongs to other systems.
Publishing before checking the final user journey
Open the site on mobile and desktop, test the custom domain from a cold browser, click navigation links, submit forms, and inspect assets such as images and scripts. Domain connection is not finished until the site behaves normally on the final URL.
If your project is a small brochure site or launch page, these companion guides can help with the bigger decision set: Best Free Hosting for Small Business Brochure Websites and Best Free Hosting for Documentation Sites and Product Changelogs.
When to revisit
This setup is worth revisiting whenever your workflow, host, or business needs change. A domain connection is not a one-time technical checkbox; it is part of site operations.
Review your setup when:
- You change hosting providers or move from a free tier to a paid plan.
- You add a new site section on a subdomain such as docs, blog, portfolio, or app.
- You redesign the site in a different website builder or static site tool.
- You change DNS providers or transfer the domain to a new registrar.
- You notice SSL warnings, redirect loops, or mixed hostname indexing.
- You enter a seasonal planning cycle and want a launch checklist before campaigns or product updates.
For an efficient revisit, use this short action list:
- List every public hostname you want to support.
- Identify the primary canonical hostname.
- Export the current DNS records before editing.
- Confirm which records belong to web, email, and other services.
- Match the host's current custom-domain instructions exactly.
- Test HTTP, HTTPS, apex, and www behavior after changes.
- Verify SSL, redirects, and analytics on the final domain.
- Document the setup so the next update is faster.
If you eventually outgrow the limits of free website hosting, plan the next step before the migration becomes urgent. This guide can help: Cheapest Ways to Host a Website After You Outgrow the Free Tier.
The main takeaway is simple: connecting a custom domain to free hosting is mostly a matter of careful sequencing. Start with the host's exact DNS requirements, make only the necessary record changes, wait for propagation, then verify SSL and redirects on every hostname you intend to keep. If you save that process as a checklist, the next launch becomes much easier.