# The checkout domain and Shopify's storefront

> Give the Shopify checkout a sub-domain of your own, and let Smootify's Redirect theme send every page of the Shopify online store to the same page on your Astro site, with discount links and Collabs links still working.

Status: Ready (Smootify 2.0)  
URL: https://www.smootify.io/docs/astro/start/storefront-redirect  
Updated: 2026-10-22

Shopify keeps its own storefront, the **Online Store**, at `example.myshopify.com`. Visitors can still reach it from an old link or a search result. If you do not use it, Smootify’s **Redirect theme** sends them to your site. It is the same theme for every Smootify site: you set it to your Astro site’s address.

## 1. What the theme does

- It sends every page of the Online Store to the same page on your site, except the cart page.
- Product and collection pages go to your own routes, using the folder names you set in the theme.
- Shopify’s bot check and discount links keep working. A discount link sends the visitor to your site with the code, and Smootify applies it to the cart.
- The query of the link is forwarded to your site, with the `?discount` code kept from the cookie.
- It lets the Smootify dashboard read your app embeds, such as the Shopify Inbox chat, straight from the store: see [Shopify Inbox](https://www.smootify.io/docs/astro/features/shopify-inbox).
- Creator links from Shopify Collabs reach your site through it: see [Shopify Collabs](https://www.smootify.io/docs/astro/features/shopify-collabs).

## 2. Set it up

1. Download the [Redirect theme](https://deliverables.smootify.io/Smootify%20-%20Redirect%20theme-1.1.1.zip).
2. In Shopify, go to **Online Store, Themes** and upload the file.
3. Click **Customize**, then open **Theme settings, Storefront** and fill in:
   - **Hostname**: the domain of your site, without the protocol, such as `www.example.com`. Use the same host your site answers on: with or without `www` as in [Deploy to Cloudflare](https://www.smootify.io/docs/astro/start/deploy#3-add-your-domain).
   - **Products Base**: the folder of your product pages, `products` in the project Studio makes.
   - **Collections Base**: the folder of your collection pages, `collections` in the project Studio makes.
   - **Custom redirects**: one line for each other page, as `Shopify path > Storefront path`.
   - **Integrate with customer accounts**: on by default.
4. Publish the theme.

If you changed the folder names in `routes` of `smootify.config.mjs`, use the same names here.

The theme does not add a trailing slash to the address it sends visitors to. On Cloudflare that costs one extra hop to the address with the slash.

Already using an older version? Upload the new file the same way and publish it. A theme uploaded from a file starts with the default settings, so fill in **Theme settings, Storefront** again.

## 3. Give the checkout a sub-domain

Your Astro site and the checkout live on two hosts: Cloudflare serves your pages on your main domain, and Shopify serves the checkout. The checkout works on the `.myshopify.com` address too, but customers trust a checkout on your own domain more, so connect a sub-domain to Shopify:

1. Keep your main domain, such as `www.example.com`, on the site’s Worker in Cloudflare only: see [Deploy to Cloudflare](https://www.smootify.io/docs/astro/start/deploy#3-add-your-domain). If it was connected to Shopify before, for an Online Store, remove it from Shopify, or the checkout breaks.
2. In Shopify, go to **Settings → Domains** and connect a sub-domain, such as `store.example.com`.
3. Make it the store’s primary domain. The checkout opens on the primary domain.

The checkout is Shopify’s page, not one of your Astro pages: its logo, colours and a few other settings are in Shopify’s checkout settings.

## Before you publish

> [!STUCK]
> - **Visitors of the Shopify store land on a 404 page.** **Products Base** or **Collections Base** differs from the folders of your site.
> - **Visitors are redirected twice.** **Hostname** is not the host your site answers on, for example without `www` when the site uses it.
> - **The cart page does not redirect.** It stays on Shopify's storefront by design.
> - **The checkout does not open, or opens on your site's host.** The main domain is still connected to Shopify. Remove it from Shopify and keep it on the Worker only.
