Redirect to Firebase Hosting custom domain

断了今生、忘了曾经 提交于 2019-12-18 12:58:20

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/34212039/redirect-to-firebase-hosting-custom-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!