问题描述
我已经购买了一个域名(www.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托管,我如何在Firebase(sub.mydomain.com)上创建一个子域名更新
Update
现在,您可以将多个域添加到单个Firebase Hosting站点。域可以提供网站内容或重定向到另一个域(可随时编辑)。此外,您现在可以在不同的项目中使用相同注册域的子域,例如一个项目上的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 Hosting,它会将其他人重定向到您指定自定义域时所选择的内容。如果您希望简单地从一个子域中提供内容,您需要做的就是在Hosting选项卡的自定义域字段中指定一个,并将该子域名指向Firebase Hosting,然后按照提供的说明进行操作。
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上创建自定义子域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!