---
schema_version: "1"
id: 1d225a285dd6af8829c9c051e69d215a973e1493df91d1c77897b0cec7499604
title: Configure Address Autocomplete for Storefront Next
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/sfnext/guides/sfnext-address-autocomplete.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-address-autocomplete.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2c86a0b70abe98f28144662e047199ab3fb32bf568009e456733a52a8e905495
products:
  - Composable Storefront
  - Salesforce APIs
---
# Configure Address Autocomplete for Storefront Next

Address autocomplete streamlines checkout in Storefront Next for B2C Commerce. During checkout, shoppers can enter the first three characters of their shipping or billing address to instantly receive Google-powered recommendations. When a shopper selects an address from the list of recommendations, Google completes the remaining fields.

![Checkout by using address autocomplete.](https://developer.salesforce.com/docs/media/sfnext/sfnext-address-autocomplete.png '{"class": "image-xl"}')

On production instances, address autocomplete uses a Salesforce-provided platform API Key by default, so no additional API Key setup is required.

On non-production environments, such as on-demand sandboxes (ODS), development, and staging instances, you must set up and use your own API Key. Set up your own Google Cloud Platform (GCP) project and billing, and your own API Key for the Google Maps Platform. Then, input the API Key as a new `PUBLIC__app__features__googleCloudAPI__apiKey` environment variable in your Managed Runtime (MRT) project. See [Getting started with Google Maps Platform](https://developers.google.com/maps/get-started#create-project) and [Environment Variables](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/environment-variables.html). You can also configure a custom API Key on production instances if you don't want to use the Salesforce-provided platform API Key.

1. Set up Storefront Next.

   To create a storefront with a GitHub repository, see [Create a Storefront in Business Manager with a GitHub Repository](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-quick-start-create-bm-github.md). To create a storefront with local code, see [Create a Storefront in Business Manager with Local Code](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/sfnext-quick-start-create-bm.md).

2. (Required only for production instances) To allow the Google API key to become available in Storefront Next, update the hostnames in your alias file.

   a. In Business Manager, click App Launcher, and then select **Merchant Tools** | **Site** | **SEO** | **Aliases**.

   b. Specify your hostnames in the alias file, and then save your changes.

   **important:** If you’ve already specified your hostnames in the alias file, save the file again for the Google API key to become available.

   See [Hostname Aliases](https://help.salesforce.com/s/articleView?language=en_US&id=cc.b2c_hostname_aliases.htm), [Configure a Hostname Alias](https://help.salesforce.com/s/articleView?language=en_US&id=cc.b2c_configuring_hostname_alias.htm), and [Configure MRT Routing Rules in Business Manager](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/configure-mrt-routing-bm.html).
