重定向到Firebase托管自定义域 [英] Redirect to Firebase Hosting custom domain

查看:149
本文介绍了重定向到Firebase托管自定义域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Firebase托管(例如myapp.domain.com)设置了一个自定义域名。 如何重定向(或关闭)默认的Firebase主机URL(例如myapp.firebaseapp.com),以便应用程序只能从自定义域访问?

解决方案

您无法关闭子域名。您的应用始终可以在 https://myapp.firebaseapp.com 上设置自定义域名。



要重定向人,您可以向您的HTML添加一个规范链接:

 < link rel =canonicalhref =http://myapp.domain.com//> 

详细了解在Google网站管理员中心博客上指定您的规范


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托管自定义域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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