问题描述
我使用Firebase托管(例如myapp.domain.com)设置了一个自定义域名。 如何重定向(或关闭)默认的Firebase主机URL(例如myapp.firebaseapp.com),以便应用程序只能从自定义域访问?
您无法关闭子域名。您的应用始终可以在 https://myapp.firebaseapp.com
和上设置自定义域名。
要重定向人,您可以向您的HTML添加一个规范
链接:
< link rel =canonicalhref =http://myapp.domain.com//>
详细了解。
I have setup a custom domain with Firebase Hosting (eg. myapp.domain.com).
How can one redirect (or turn off) the default Firebase Hosting URL (eg. myapp.firebaseapp.com) so that the app is only accessible from the custom domain?
You cannot turn off the subdomain. Your app will always be available on https://myapp.firebaseapp.com
and whatever custom domain you've set up.
To redirect people, you can add a canonical
link to your HTML:
<link rel="canonical" href="http://myapp.domain.com/" />
Read more about that in Specify your canonical on the Google Webmaster Central Blog.
这篇关于重定向到Firebase托管自定义域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!