2

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 Answer 1

2

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
    }]
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.