Magento 2.3 PWA – How to Change URL

magento2.3pwapwa-studiovenia

I have installed the PWA studio successfully with the Venia storefront. But my development environment URL is generating something like below.

https://magento-venia-concept-3328z.local.pwadev:8048/

How I can change the URL to something else.

Best Answer

You can change the PWA development environment domain names by updating below env variables inside below path.

/var/www/pwa-studio/packages/venia-concept/.env:37

And uncomment below lines and give your domain names.

#   By default your subdomain will be detected from your package.json name.
#   Use this to override it.
#   MAGENTO_BUILDPACK_SECURE_HOST_SUBDOMAIN='custom-value'
#   This will prepend the uniquely generated domain with `custom-value`.
#
#   By default your custom host will be a subdomain of `local.pwadev`.
#   Use this to specify an entire domain, avoiding that TLD.
#   MAGENTO_BUILDPACK_SECURE_HOST_EXACT_DOMAIN='my-favorite.pizza'

Then rebuild using below commands and watch the Venia storefront on the new domain name.

npm run build
npm run watch:venia
Related Topic