Dynamic link without a custom URL / suffix

Viewed 416

In Firebase, we can use a dynamic link to redirect to another URL. For example, I can have something like https://example.com/download to redirect to my app's download page (https://play.google.com/store/apps/details?id=some.package.name)

However, in my case, the landing page isn't ready yet and I want to redirect all visitors to https://example.com to the app download page. The problem is firebase requires you to have a short URL (suffix after the /) with every dynamic link, so I can't directly use dynamic links.

How can I accomplish such a redirection using firebase?

1 Answers

You can use redirects to achieve this. In firebase.json add something like:

{
  "hosting": {
    "redirects": [{
      "source": "/",
      "destination": "https://play.google.com/store/apps/details?id=some.package.name",
      "type": 302
    }]
  }
}
Related