Firebase自定义域名

凯尔

配置自定义域时遇到很多麻烦。当前,如果您转到我的网站www.mydomain.com,它将重定向到默认的somecrazyname.firebase.com。在我的Google网域中,我只是将www.mydomain.com和mydomain.com都重定向到mycrazyname.firebase.com只是为了使某些活动生效,直到我能弄清楚为止。我的问题是,如何做到这一点,当您访问www.mydomain.com时,它会停留在www.mydomain.com上,同时显示我的惊人内容,而不是somecrazyname.firebase.com。只要我的自定义网址(验证等),一切都可以使用firebase正确配置。但是,URL firebase给我的是https mydomain.com(如果去那里,它说该站点无法显示),我在Google域上的域是http。一世' ve尝试在我的firebase json以及我在Google域中的综合记录中配置重定向,但运气不佳,没有主意。我还查看了托管自定义域文档的firebase,但没有理解。这是一些视觉效果。Firebase控制台Firebase的JSON

My redirects as seen on Google domains 谷歌域名重定向

I'm sure it's just a matter of putting things in the right places, but I have been trying this for a few hours and have not had any luck.

kyle

It was the synthetic records that was causing the issue for me. I was using CName records which, by the direction of the firebase support team is good only for subdomain redirects. Below is part of an email from the firebase support team. This is her answer to this as well as some helpful explanations.

  1. Firebase uses TXT records for the verification of your custom domain.

  2. On the other hand, CNAME and/or A records are used for redirection. Please take note of the following:

    • If you have a subdomain, CNAME records are recommended
    • 请注意,带有“ *”的主机名表示通配符。在您的自定义域之前键入的所有子域都会将您重定向到托管的自定义域。

    • 否则,如果您有一个没有子域的自定义域,则建议使用A记录。

    • 请注意,同时添加两个A记录将提高重定向性能
    • 另外,请删除Firebase以外的其他A记录,以防止重定向问题

就是这样 Firebase静态主机仅需要三个记录(TXT,CNAME,A)。除此之外,您将不需要实施域转发,例如您的Synthetic记录。不过,我建议您删除合成记录,并添加我在上一封电子邮件中提供的A记录。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章