如何在 Firebase 上创建自定义子域? [英] How do I make a custom subdomain on Firebase?

查看:23
本文介绍了如何在 Firebase 上创建自定义子域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我购买了一个域(www.mydomain.com").如果我使用 Firebase 托管,如何在 Firebase 上创建子域(sub.mydomain.com")?

I have purchased a domain ("www.mydomain.com"). How do I make a subdomain on Firebase ("sub.mydomain.com"), if I am using Firebase hosting?

推荐答案

更新

您现在可以将多个域添加到单个 Firebase 托管站点.域可以提供站点内容或重定向到另一个域(可随时编辑).此外,您现在可以在不同项目中使用同一注册域的子域,例如一个项目中的 example.com 和另一个项目中的 blog.example.com.访问您的托管管理页面进行配置.

You can now add multiple domains to a single Firebase Hosting site. Domains can either serve site content or redirect to another domain (editable at any time). In addition, you can now use subdomains of the same registered domain on different projects, such as example.com on one project and blog.example.com on another. Visit your hosting admin page to configure them.

原答案

如果您将 mydomain.com 的多个子域指向 Firebase 托管,它会将其他子域重定向到您在指定自定义域时选择的子域.如果您只想提供来自一个子域的内容,您只需在托管"选项卡上的自定义域字段中指定该子域,然后按照提供的说明将该子域的 DNS 指向 Firebase 托管.

If you point multiple subdomains of mydomain.com to Firebase Hosting, it will redirect others to the one you chose when specifying your custom domain. If you're looking to simply serve content from one subdomain, all you need do is specify that one in the custom domain field on you Hosting tab and point your DNS for that subdomain to Firebase Hosting, following the instructions provided.

但是,如果您希望在不同的子域上提供不同的内容,目前这是不可能的,尽管这是我们正在考虑实施的一个非常受欢迎的功能

If, however, you're looking to serve different content on different subdomains, that's not currently possible, though this is a highly requested feature that we're considering implementing

这篇关于如何在 Firebase 上创建自定义子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆