Moved Hosts And HTTPS Broke? Remove The Old Custom Domain

Moved hosts and a strange certificate is about to expire? Check for an old custom domain still on the host you left. How we found ours, and how we fixed it.
The OxyPages Team · · 9 min read
You moved your site or your API to a new host. You changed the DNS records at Cloudflare, the new server answers, and you switched the old service off. Done.
Then a checker says your certificate expires in a few days, and it's one you don't recognise. Your server's certificate is fine. So is the free one Cloudflare gives your domain. Something else is being served.
Look at the host you left. If the old custom domain is still attached to the service you moved away from, and that host runs on Cloudflare too, Cloudflare can keep serving the old host's certificate for your hostname long after your traffic left. The old host can't renew it, so one day it expires.
This happened to us in November. Ours didn't break. It was three days from breaking.
Here's what we saw, how we proved it, and the fix.
TL;DR: If you moved a hostname to a new host and Cloudflare serves a certificate that isn't yours, look for a leftover custom domain on the old host. A platform built on Cloudflare for SaaS attaches your hostname as a custom hostname, and Cloudflare prefers that exact-match certificate over your zone's Universal wildcard. Once your traffic has moved, the old host can't renew it, so it runs out. Delete the domain from the old service and Cloudflare switches back to your own certificate within minutes. Then add a daily check of the certificate visitors actually see.
We Moved Our API And Left Two Domains Behind
On 11 September 2026 we moved our API off Render and onto our own server on AWS. Two hostnames went with it: api.oxypages.com, and the one next to it for our MCP server, the address AI assistants connect to.
If you're planning a similar move, here's how to split a Render setup between two hosts. This post is the cleanup after it.
I switched the DNS records in Cloudflare to point at the new server and suspended the Render service. What I didn't do was delete the two custom domains from that service. It was suspended. Nothing could reach it. It didn't seem to matter.
On 20 November a routine health sweep flagged the API. The certificate visitors were being handed expired on 23 November, three days away.
That made no sense at first, because every certificate I knew about was fine:
- Our server's own certificate was valid until February 2027.
- The Cloudflare dashboard showed our zone's Universal certificate, the free one Cloudflare gives every domain, as Active until 5 February 2027.
So whose certificate was this?
Why Cloudflare Served The Old Host's Certificate

Cloudflare served Render's certificate because Render still had our hostname attached as a custom hostname, and Cloudflare ranks that certificate above the free one on our own zone.
Render runs on Cloudflare as well, and attaches your custom domains through Cloudflare for SaaS, a product that lets a platform serve customers' domains with certificates it manages. Render issued a certificate for our API hostname on 25 August, the day we first added the domain.
When your domain is on Cloudflare and you point a proxied record at a platform that's also on Cloudflare, traffic passes through two Cloudflare zones, yours and then theirs. Cloudflare calls this orange-to-orange, or O2O, after the orange cloud on a proxied record. That's how we ran until the move. If proxied records are new to you, the guide to connecting a domain covers the basics.
Repointing our DNS record ended that routing. It didn't remove the custom hostname from Render's side, or the certificate attached to it.
Cloudflare's docs explain the rest. When Cloudflare picks a certificate, one that matches the hostname exactly beats a wildcard, and in its priority list a Cloudflare for SaaS custom hostname certificate sits above the free Universal certificate. Cloudflare's certificate and hostname priority docs
Our Universal certificate is a wildcard. Render's was an exact match for the API hostname. So visitors got Render's.
That's harmless while Render can renew it. It couldn't, because our traffic no longer reached Render. So the certificate sat there, counting down.
How We Proved Which Certificate Was Served
We proved it with one handshake test, run with two names. A TLS handshake is where a browser says which name it wants and the server hands back a certificate.
A made-up name under our domain came back with our zone's wildcard certificate, valid to February. The API hostname and the MCP hostname each came back with a certificate issued for that one name only, expiring in three days.
Same domain, same Cloudflare edge, two different certificates. A per-hostname certificate we never ordered could only come from a custom hostname on someone else's account.
Was three days ever normal? Across 45 other sites on Cloudflare, the certificate with the least time left had 31 days. Cloudflare renews about 30 days before expiry, so three days meant renewal was stuck, not late.
Run The Same Check On Your Own Domain
You need a terminal and openssl, which comes with macOS and most Linux systems. Swap in your own hostname:
openssl s_client -connect api.example.com:443 -servername api.example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -enddate
Then run it again with the same address but a name that doesn't exist:
openssl s_client -connect api.example.com:443 -servername made-up.example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -enddate
-connect says where to go. -servername says which name to ask for, which is how a browser picks its certificate. Read the answers against this table:
| What you see | What it means | What to do |
|---|---|---|
| Both names return your wildcard, over 30 days left | Normal | Nothing |
| The real name returns a certificate for that exact name, which you never ordered | Another Cloudflare account has your hostname attached | Remove the domain from the old host |
| That certificate has well under 30 days left | Its owner probably can't renew it | Same, and soon |
| The certificate is for a different name entirely | DNS points at a server that doesn't know your domain | Fix the record, or add the domain at the new host |
| Nothing comes back | Nothing is answering on port 443 | Check the record and the new server |
What actually breaks when a certificate runs out is in what an SSL certificate costs and what happens when it expires. For an API it's worse than a warning page, because an app has no "proceed anyway" button.
Remove The Old Custom Domain, Not Just The DNS Record
The fix is to delete the domain from the service you left. Changing DNS moves the traffic. Only removing the old custom domain tells the old host to let go of the name.
For us that meant opening the suspended Render service and deleting both hostnames from its custom domains. Within a few minutes Cloudflare was serving our own Universal certificate, valid to 5 February 2027. We checked both hostnames, and both worked.
Lost access to the old account? The same Cloudflare page says a certificate for that exact name, issued in your own zone, would outrank it. That needs a paid add-on, so it's the fallback, not the fix.
Every platform that takes a custom domain keeps its own list of them, and an entry there outlives your DNS change:
- Render: each service's custom domains
- Vercel: the project's domains
- Netlify: the site's domain settings
- Heroku: the app's domains
- Fly.io: the app's certificates
- Railway: the service's networking settings
Not all of these run on Cloudflare, so not all can cause this exact clash. A leftover entry is still a loose end, and here's why.
What Is A Subdomain Takeover?
A subdomain takeover is when a stranger gets to serve content on your subdomain, because your DNS still points at a service you stopped using.
It's the mirror image of our problem. Delete the project on the old host but leave the DNS record, and if that platform lets any account claim an unclaimed domain, someone else can add your subdomain and serve whatever they like under your name. MDN lists what that opens up, including reading cookies set on your main domain. MDN on subdomain takeovers
So there are two kinds of leftover:
- A domain still on the old host, with DNS pointing elsewhere. That's what we had. The certificate can clash and expire.
- A DNS record still pointing at the old host, with the domain gone from it. That's the takeover risk.
The safe order closes both: move the record, then remove the domain from the old host, then delete the old service.
What Should You Remove When You Move Hosts?

Remove the custom domain from the old service and any DNS record that still points at it. In order:
- Point the DNS record at the new host and confirm it answers over https. Here's how long DNS propagation really takes.
- Delete the custom domain from the old service. Every hostname, including www and any API or admin subdomains.
- Run the handshake test on each hostname and confirm you see the certificate you expect.
- Delete or suspend the old service once nothing points at it.
- Sweep the DNS zone. Every record should point at something you still use.
- Write down where each hostname lives. Hostname and host, one line each.
We did steps 1 and 4 in September and skipped 2 and 3. That's the whole story.
The Daily Check We Run Now
Every day we now do a real TLS handshake to each public hostname we have, exactly as a browser does, and read the certificate that comes back. It alerts us when a certificate has under 14 days left, doesn't verify for its name, or the handshake fails.
Why 14 days? Healthy certificates renew about 30 days out, so under 14 means renewal was missed, with two weeks still left to fix it.
The point is checking what visitors see. We already watched our server's own certificate, and that one was fine the whole time. Behind Cloudflare's proxy, visitors never see it. A check that only looks at the server would have stayed green right up to the outage.
The same day, we swept for other leftovers. No custom domains are left on old services, and every DNS record points at something still in use.
No time for a script? Most uptime services can watch certificate expiry. Point yours at the public hostname.
What To Do Next
If you've moved anything between hosts this year, run the handshake test on each hostname today, and check that every host you've left has an empty domain list.
Then put a certificate check on a schedule. The day it matters is usually a day nobody is looking.
For our own customers, the shared myoxypages.com address that sites start on is in that same daily check, and the Domains page keeps re-checking a connected domain until its setup is confirmed. It runs the other way too: custom domains on OxyPages are Cloudflare for SaaS custom hostnames, so if you ever leave, remove the domain from your site with us as well.
To be clear about the limits, we host static sites and built front ends, not APIs or servers. For the API half of a move like ours, you'll need another host. For the site half, see what each plan includes.
FAQ
Why does Cloudflare serve a different certificate from the one in my dashboard?
A host you used before may still have your hostname attached as a custom hostname, and Cloudflare ranks that exact-match certificate above your zone's Universal one. Your dashboard only shows your zone's certificates.
Will deleting the custom domain from my old host take my site down?
Not if your DNS already points at the new host. The old host stops claiming the name and Cloudflare falls back to your own certificate. For us that took a few minutes, and both endpoints checked out fine afterwards.
How do I check a certificate's expiry date without a terminal?
Click the icon at the left of your browser's address bar and open the certificate details. That shows the certificate visitors actually get, who it was issued for, and when it expires. Do it for every hostname, not just the main site.
Do I still need to remove the domain if I only suspended the old service?
Yes. Suspending a service stops it running, not its claim on your name. Ours sat suspended for over two months with the old custom domain still attached, holding a certificate three days from expiring.