Hatchi Roku
Hatchi Roku

Reputation: 1004

Firebase - Redirect From Domain A to Domain B

Firebase gave .web.app domains for free, so I currently have two domains for my Firebase website:

  1. mywebsite.firebaseapp.com (Domain A).
  2. mywebsite.web.app (Domain B).

I want to redirect all traffic from domain A to domain B with firebase.json. How can I do that?

Upvotes: 1

Views: 335

Answers (1)

nachshon f
nachshon f

Reputation: 3680

You could try this...

hosting": {

  "redirects": [ {
    "source": "mywebsite.firebaseapp.com",
    "destination": "mywebsite.web.app",
    "type": 301
  }

}

Although if that doesn't work then there is probably no way to do this as both domains point to the same IP address and as far as I know, the firebase hosting DNS is not customizable.

Upvotes: 1

Related Questions