Firebase "Internal hosting error. DNS request failed" fix
Firebase custom domain stuck on pending or "Internal hosting error. DNS request failed"? Fix conflicting records, CAA, proxies and host names, step by step.
The Liite team7 min de leitura
Short answer
Firebase's own help says it can't issue an SSL certificate while your domain has A, CNAME or AAAA records pointing at other providers, so delete those first. Then check the Host field, any proxy or CDN in front of the domain, and CAA records, and give DNS up to 24 hours to propagate.
Your TXT and A records look right, but the custom domain in Firebase Hosting stays on "pending" for days, or the console shows this:
Internal hosting error. DNS request failed
Firebase has not published a page that explains that exact message. The fixes below come from Firebase's custom domain help page, plus what people on the Firebase subreddit and the Cloudflare community forum report. Some of those reports are about App Hosting rather than classic Hosting, so treat anything not in Firebase's docs as "worth trying".
Why it happens
Firebase Hosting goes through stages: ownership check (TXT), pointing traffic (A records), then SSL certificate minting. The status tells you where you are. "Pending" means you set up the domain correctly, but Hosting hasn't provisioned an SSL certificate. "Needs setup" is different: in most cases the A records haven't propagated to Firebase Hosting servers.
The causes, most common first:
- Leftover records. Remove any A or CNAME records that point to other providers, and any AAAA records. If any of these exist, Firebase cannot provision an SSL certificate.
- A proxy or CDN in front of the domain. Cloudflare's orange-cloud proxy answers with its own addresses instead of yours. Hostinger's guide tells you to switch its CDN off for the same reason. If you have enabled Hostinger CDN, disable it.
- Restrictive CAA records. Overly strict CAA records can stall certificate minting. Make sure
letsencrypt.organdpki.googare allowed to issue certificates for your domain. - A wrong Host field. Registrars want different input here (see the table below). Some people report that
*in the name field finally worked at their registrar. That is not in Firebase's docs, so try it only after the standard form fails. - Propagation. Firebase says to allow up to 24 hours for TXT records to propagate before you click Verify.
- A stale challenge token (Advanced Setup). If SSL challenges failed, the token is now invalid. Click View for the domain and give the new token to your existing domain.
- A Firebase-side problem. One older community thread describes an incident where domains needed re-verifying. You can't tell from outside, which is why support is the last step below.
How to fix it
1. Clean out conflicting records
At your DNS provider, list every record on the apex and on www. Delete A, AAAA and CNAME records that point to an old host, including any AAAA record you didn't add yourself. Keep only the records Firebase shows you.
2. Check the Host field
Firebase lists the common inputs per provider. Use the one your registrar expects:
| Domain type | Common Host inputs (per Firebase) |
|---|---|
| Apex | @, the full domain, or blank |
| Subdomain | The full subdomain, only the subdomain part, or www |
Open the saved record and confirm which name it ended up on. Some providers append the domain automatically, which can create example.com.example.com by accident.
Keep the TXT record
Firebase says to keep the TXT record permanently, because it proves ownership and authorizes certificate issuance and renewal. Deleting it after verification can cause trouble later.
3. Turn off proxying
If DNS is on Cloudflare, set the records to DNS only until the domain shows Connected. Do the same for any registrar CDN.
4. Check CAA records
Look for CAA records on the domain. If any exist, make sure they allow letsencrypt.org and pki.goog, as Firebase's help says. If you have no CAA records, skip this step.
5. Look at what the world sees
Firebase suggests the Google Admin Toolbox Dig service to check whether your DNS records updated. Query the TXT and A records for both the apex and www. Even when records have updated, propagation or certificate provisioning may need more time.
6. Wait, then retry
Firebase provisions the certificate within 24 hours after you point your A records to it. If everything matches and you are well past a day, remove the domain in the console and add it again so Firebase starts a fresh check. Removing and re-adding is what people report trying. It is not an official fix.
7. Check your own setup flow
Quick Setup suits new domains with no traffic or domains moving from another Hosting site. Advanced Setup is for a domain already serving traffic elsewhere. If you picked Advanced and the migration failed, go back to step 6 of the causes and use the new token.
Cause, symptom and fix at a glance
| Cause | Symptom | Fix |
|---|---|---|
| Old A/AAAA/CNAME | Pending, no certificate | Delete records pointing elsewhere |
| Proxy or CDN on | Lookup shows other IPs | Set to DNS only |
| Strict CAA | Pending after DNS is right | Allow letsencrypt.org, pki.goog |
| Wrong Host field | Verify fails | Use your registrar's form of the name |
| Stale token | Needs setup (Advanced) | View domain, use the new token |
| Too many subdomains | Pending on new subdomains | Stay at 20 or fewer per apex |
Firebase recommends no more than 20 subdomains on one apex domain because of certificate limits. Each custom domain can only be connected to one Hosting site.
Checklist before you try again
- Only Firebase's records remain on the apex and
www. - No AAAA record you didn't add on purpose.
- Proxy and CDN are off.
- CAA records, if any, allow the two certificate authorities.
- The TXT record is still present, on the right name.
- A lookup shows the same values the console asks for.
- At least 24 hours have passed since the last DNS change.
What won't help
- Adding extra records "just in case." More records on one name makes conflicts more likely.
- Changing nameservers mid-verification. It adds a second propagation delay on top of the first.
- Re-saving the same record repeatedly. Nothing suggests this restarts Firebase's check.
If nothing works
Contact Firebase support through the Firebase console's help menu. You can't see their DNS lookup, but they can. Include the exact error, the domain, whether it's Hosting or App Hosting, which setup mode you chose, when you last changed DNS, and a lookup result for the TXT and A records.
Subject: Custom domain stuck on Pending / "Internal hosting error. DNS request failed"
Project ID: <your project ID>
Domain: example.com (and www.example.com)
Product: Firebase Hosting (or App Hosting)
Setup mode: Quick / Advanced
Error text: Internal hosting error. DNS request failed
Last DNS change: <date and time, with time zone>
I removed all A, AAAA and CNAME records pointing elsewhere, turned off proxying, and confirmed
the TXT and A records with a public DNS lookup (attached). It has been more than 24 hours.
Please check the last DNS fetch for this domain.If you only need a simple site online
If the goal is a static site on your own domain rather than Firebase's backend, Liite is a partial fit. A custom domain is available on Pro and up, one per site. You add the DNS records it shows (an A record to 76.76.21.21 for the apex, or a CNAME to cname.vercel-dns.com for a subdomain) and the status turns Active. It serves pages and uploaded HTML, zips and PDFs, not server code or databases. See the custom domains docs.
Common questions
How long should a Firebase custom domain stay pending?
Firebase's docs say certificate provisioning happens within 24 hours of pointing your A records. If it's past that and records are clean, work through the CAA and proxy checks, then contact support.
Do I need both the TXT record and the A records?
Yes in most flows. The TXT record establishes ownership, and the A and AAAA records send requests to Hosting. The TXT record should stay in place.
Why does Firebase tell me to remove AAAA records?
Its help states that if A, CNAME or AAAA records point to other providers, it can't provision the certificate. Remove the ones that point elsewhere. Keep any A or AAAA records Firebase itself gives you.
Does www need its own setup?
It's a separate name, so a correct apex doesn't prove www is right. Check each in a lookup, or use the redirect option in the wizard.