In Magento 2 installation, many stores that share the same Admin can be included in a single installation. Stores that are on the same website share the same domain, IP address, security certificate and a single checkout process.
Remember that the stores also share the same Magento code and admin backend. Store administrators can allow the store to share the same catalog or have a separate catalog. To have a different main menu for each store, each store can have a separate root category. Stores can have different branding, presentation, and content. You have to spend some time preparing a plan for your store hierarchy with future growth in mind because your plan will be used throughout the configuration.
In these examples, URLs can be configured for multiple stores:
yourdomain.com/store1 | Each store shares the same domain and has a different path |
yourdomain.com/store2 | |
store1.yourdomain.com | Each store has a separate subdomain of the primary domain. |
store2.yourdomain.com |
Step 1: Select a Store Domain
- Set up a subdomain of your primary domain.
- Set up a different primary domain.
Step 2: Create a New Store:
- On the Admin Sidebar, click Stores. Under Settings, click All Stores.
- Click Create Store and follow these steps:
- Select the Web Site that is to be the parent container of the new store. If the installation has one web site, select the “Main Website” default mode.
- Input the Name and Code for the new store. The name is for internal reference only, the Code has lowercase character.
- Set Root Category that defines the category structure for the main menu of the new store. You can select a specific root category for the store or “Default Category”. Of course, you can come back and update the setting later.
- Click Save after completed.
Step 3: Create A Default Store View
- Click Create Store View
- Change Store to the created store
- Input Name and Code
- Change Status to Enabled
- In the Sort Order field, enter a number of the store’s place on the list of stores.
- Click Save Store View
This is the new default view of your store in Edit mode
Step 4: Configure the Store URL
- Click Store > Configuration. Under General click Web
- Set Store View to the created view for the new store. Click OK after confirmed scope switching.
Open the Base URLs tab, follow these steps:
- Uncheck the Use Website checkbox.
- Input the Base URL for the Store
- Open the Secure Base URLs tab, repeat the previous step to configure the store’s secure URL.
- Click Save Config after completed.