Overview
You have set up a custom subdomain for your Progressive Web App (PWA), but would prefer to use your root or base domain instead of a subdomain, this can happen because you want to take advantage of the shorter URL or due to SEO reasons.
As part of setting up a custom PWA subdomain, we will generate and update the SSL Certificate for the custom subdomain. For example, if you own yourdomain.com, and configure your PWA to the subdomain app.yourdomain.com, you will be able to access https://app.yourdomain.com as we generated that certificate.
Environment
- Your custom domain has been set up following our Adding a PWA Custom Domain article.
- You have received email confirmation that the subdomain has been validated by the CMS.
- You can access your PWA by navigating to the custom subdomain.
Back to the top
Solution
Replace yourdomain.com and subdomain.yourdomain.com with your real domain and subdomain in the following examples:
- On your GoDaddy account, search the list of domains for
yourdomain.com, and select “Manage DNS”. - On the bottom of the DNS Management page, look for the Forwarding section.
- Select ADD on the DOMAIN section, a form will appear.
- Fill the FORWARD TO field with
subdomain.yourdomain.com. - As we provide a valid SSL certificate for the subdomain you added in our Client CMS Panel, you can change the
http://field tohttps://. - Set the FORWARD TYPE to
Temporary (302)until you have tested this redirection to work correctly, afterward you can change it toPermanent (301). - On SETTINGS, pick Forward Only.
- Check the “Update my nameservers and DNS settings to support this change” checkbox.
- Click the “SAVE” button.
- The change will start propagating, this can take up to 48 hours.
Note: GoDaddy’s Forwarding does not support HTTPS, after following the steps above, you will be able to access subdomain.yourdomain.com by visiting http://yourdomain.com, if you try to access it via https://yourdomain.com, a security error will appear and the connection will be denied.
If you wish to use your root domain with HTTPS to redirect to your PWA subdomain ( https://yourdomain.com instead of http://yourdomain.com), you need to acquire an SSL Certificate for that root domain and set up hosting in a server (either shared or dedicated) that allows you to configure website redirection via a web page script, or alternatively, set up redirection directly on the webserver configuration.
Back to the top
Testing
- Visit
http://yourdomain.com, if the forwarding has propagated correctly, you should be redirected to your working PWA athttps://subdomain.yourdomain.com.
Comments
0 comments
Please sign in to leave a comment.