Domains, SSL & Final Checks
Put the websites on your own domains with HTTPS, and tell Firebase and Google Maps about them.
| Website | Example address |
|---|---|
| Landing page | https://www.yourdomain.com |
| Customer website | https://order.yourdomain.com |
| Restaurant panel | https://restaurant.yourdomain.com |
| Admin panel | https://admin.yourdomain.com |
1. Point the domains#
- Firebase console → Hosting → pick the site → Add custom domain.
- Enter the domain (for example
admin.yourdomain.com) and continue. - Add the TXT record Firebase shows at your domain provider to prove you own it, then the A records it gives you.
- Wait until the domain shows Connected (minutes to a few hours). Repeat for each site.
SSL is free, automatic and renews by itself. Once the domain is Connected, HTTPS works with no extra step.
At your domain provider, add an A record per subdomain pointing to your server's public IP:
Type: A Host: admin Value: 203.0.113.10
Type: A Host: restaurant Value: 203.0.113.10
Type: A Host: order Value: 203.0.113.10
Type: A Host: www Value: 203.0.113.10
Then get free Let's Encrypt certificates with Certbot:
# Nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d admin.yourdomain.com -d restaurant.yourdomain.com -d order.yourdomain.com -d www.yourdomain.com
# Apache
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d admin.yourdomain.com
Certbot renews them by itself. Check with sudo certbot renew --dry-run.
A complete Nginx site with the HTTP → HTTPS redirect looks like this:
server {
listen 80;
server_name admin.yourdomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name admin.yourdomain.com;
ssl_certificate /etc/letsencrypt/live/admin.yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/admin.yourdomain.com/privkey.pem;
root /var/www/yourbrand-admin;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
- Domains → Create A New Domain (or Subdomains), for example
admin.yourdomain.com. - Set its Document Root to the folder you upload to, and upload the contents of
build/web/plus the.htaccess(Deploy the websites). - Security → SSL/TLS Status, select the domain and click Run AutoSSL. A free certificate is issued and renews by itself.
HTTPS is required
Browsers allow push notifications and the "use my location" button only on https:// pages.
2. Tell Firebase and Google#
Authorized domains#
Firebase console → Authentication → Settings → Authorized domains: add every website domain. Without it, Google and phone sign-in are refused on that website.
Google Maps key#
If you added a website restriction to a Google Maps key, add the new domains to it (Google Maps key).
Storage CORS#
If your CORS file lists allowed origins instead of *, add the new domains and apply it again (Verify & Storage CORS).
Web client ID#
For Google sign-in on the customer website and restaurant panel, also add the domains under Authorized JavaScript origins of the Web client in Google Cloud Console → APIs & Services → Credentials, if Google sign-in shows an origin error.
3. Check every website#
- Each website opens on
https://with a padlock, andhttp://moves tohttps://. - Open a deep page of a panel and press F5. It reloads, no 404.
- Pictures show on all websites.
- Maps and address search work.
- You can sign in to the admin panel, the restaurant panel and the customer website.
- The landing page shows your texts from the admin panel, not the built-in defaults.
- The favicons, logos and titles are yours.
Blank page or old version?
A blank page or 404 on refresh is a missing rewrite rule. An old version is the browser cache: press CtrlShiftR (CmdShiftR on a Mac).