无法使用 Namecheap 通过 Firebase 验证自定义域

在我按照指令将 firebase 提供的 Text Record 1插入到我的 NameCheap 之后,这个错误消息不断弹出:

目前状态: 对不起,我们无法验证您的域名。

这条信息已经显示了大约5天了。

我截取了 firebase 和 namecheap 设置的截图如下:

enter image description here

enter image description here

在@Frank van Puffelen 建议将主机值从我的域名改为@之后,这是截图,几个小时后我们将拭目以待,希望它能成功验证。

enter image description here

等了几个小时后,这条信息出现了:

enter image description here

39748 次浏览

From other reports and the information on this Google page for verifying namecheap domains, it looks like you may have to use @ for the host field.

In the Namecheap site, click Manage next to the domain you want to verify with your Google service.

  1. Click the Advanced DNS tab on the domain dashboard.

  2. Scroll down and click Add New Record under the host records table.

  3. Select TXT Record from the record type drop-down list.

  4. Paste the entire verification record into the Value field.

  5. Enter @ in the Host field.

  6. Leave the TTL field set to Automatic.

  7. Click the green check mark to save your TXT record.

Note: The change may take up to 24 hours to update. However, as you go through the next steps in the Setup Wizard, the wizard immediately starts checking for your new TXT record to verify your domain.

Can you try that? If it doesn't work, let me know and also reach out to support@firebase.com.

Your attached screens do not show your CNAME configuration. Even though firebase instructions indeed only asks for two TXT records, records that are both correctly set up as your screens show, I believe that these pair of TXT records that firebase requests do not free you up from the need of setting up at least a CNAME record in addition to both TXT records.

This was my case: while I did not set a CNAME record, firebase never recognized my domain.

I am not an expert (sorry!), but in the lack of other answers, even I may be helpful to suggest that you set up your CNAME record to point to:

CNAME record
host: www
value: [yourfirebaseappname].firebaseapp.com.
(Please note the dot after the '.com').

In my case this was enough to make firebase works well and recognize my domain.

In my specific case, and I'll register here at least for my own future use, I prefered to use, as an after step, both A records supplied from firebase as my way to route to my domain without www.

I believe this can be done with CNAME, but in my case the final setup was:

Advanced DNS Management
type: CNAME record
host: www
value: [my-domain-name-without-www]


type: A record
host: @
value: [IP address from firebase, like '1.2.3.4']


type: A record
host: @
value: [Second IP address from firebase, like '2.3.4.5']

Everything is working fine using this configuration. Goal reached.

As a todo future step, It would be useful to learn how to achieve similar goal using the CNAME record pointing to firebase domain instead of A records pointing to firebase supplied IP addresses.

Hope this helps other users in similar situation!

I had issues connecting my custom domain as well, apart from using @ in the host field and the CNAME, you'd also need A records. Here's all I ended up with, I sat back a while for the domain to get propagated (I had just purchased it) and waited for 10 minutes after adding all of the records and it worked. Also I've found helpful instructions in this blog post.

enter image description here

I was having the same issue for days (my custom domain made it through the verification stage but would not connect) but it turns out that I didn't have to change my DNS configuration to fix it (the screenshot for the config that worked is below for reference).

I just had to re-run the Connect Domain wizard. https://firebase.google.com/docs/hosting/custom-domain

Hosting -> Select the vertical ellipsis under your custom domain -> delete domain -> then click Connect Domain to start the wizard again.

namecheap dns configuration screenshot

Lookup your domain using this tool to see if there are DNS errors https://toolbox.googleapps.com/apps/dig/

For me (with namecheap) I had to remove all existing records, then the TXT record alone worked. Reference: this post

I had the same problem and I took Namecheap support. Then they provided me following properties to change when connecting Namecheap with Firebase.

  1. For the TXT records Host should be @ instead of yourdomain.com
  2. For the CNAME records remove the trailing domain name from the Host.

    In this example value should be

    firebase1._domainkey

    and not

    firebase1._domainkey.yourdomain.com

That configuration worked for me. Seems the easiest and propagation takes around 20 minutes (include your TXT verification as well, of course).

namecheap DNS for Firebase Hosting