The project is in a healthy, maintained state
Lets a Spree store be served on its own custom domain, with admin management and host-based store resolution.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

>= 5.4.0.beta
>= 5.4.0.beta
 Project Readme

Spree Custom Domains

Serve a Spree Commerce store on its own custom domain.

This extension adds:

  • A Spree::CustomDomain model and admin management UI (Settings → Domains).
  • Host-based current-store resolution, so a request to shop.example.com is served by the store that owns that domain.
  • Spree::Store#url_or_custom_domain / #formatted_url_or_custom_domain that prefer the store's default custom domain when one is configured.

Without this extension installed, Spree core serves every request from the default store and url_or_custom_domain falls back to the store's internal URL.

Installation

Add to your Gemfile:

gem 'spree_custom_domains'

Then run:

bundle install
bin/rails spree:install:migrations
bin/rails db:migrate

The spree_custom_domains table ships with Spree core, so spree:install:migrations copies it into your app if it isn't already present.

Multi-store and multi-tenant

Custom domains are independent of multi-store catalog sharing. Install this gem on its own for single-store / multi-tenant setups that just need per-store domains, or alongside spree_multi_store for legacy catalog sharing across stores.

License

Spree Custom Domains is released under the AGPL-3.0-or-later license. A commercial license is available through Spree Enterprise.