更新时间:2023-10-13 21:25:34
您无法关闭子域名。您的应用始终可以在 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.