Reputation: 31335
I want my website to be accessible from: www.myexamplewebsite.pt
AND myexample.pt
. With and without the www
part.
Right now only www.myexamplewebsite.pt
is working.
When I try to access myexamplewebsite.pt
(without www
) this happens:
Note: Since I'm getting a page not found from Firebase (as mentioned above), I guess that there's nothing wrong with my DNS settings.
QUESTION
How can my web app be accessible from both URLs (with and without the www
) ?
The only piece of Firebase Hosting doc that I found that mentions this, didn't help me very much:
https://firebase.google.com/docs/hosting/custom-domain#set-up
UPDATE: Here is my DNS config:
Upvotes: 0
Views: 542
Reputation: 31335
Now it's working.
1 - I've added my 1st custom domain. I think I've entered it without the www
(almost sure)
2 - Somehow, after it's been connected (detected the DNS records), it was displayed on Firebase Hosting with the www
(it's the last one in the second picture below)
3 - Then I've added a new custom domain. Again, this time for sure I've entered it without www
and marked to redirect to my domain with the www
Result: Not my app is accessible with and without the www
DNS Config
Firebase Hosting Domains:
Upvotes: 0
Reputation: 83048
In my experience, creating the DNS A records for both the domains (i.e. www.myexamplewebsite.pt
and myexamplewebsite.pt
in your case) does the trick. See https://firebase.google.com/docs/hosting/custom-domain#go-live for the doc on DNS A records creation.
Upvotes: 1