Chapters Close

How to create multiple websites in Magento 2?

This article will help you to understand how one can add multiple websites in Magento 2.

Magento allows you to setup multi-websites on just single installation of Magento. Its configuration is really simple. It will allow you to create a separate website so you can handle the products, customers, product price and many more things on websites bases. 

After installing Magento you need to login into the store and follow the steps given below.

How to create multiple new websites in Magento?

You can create multiple new websites in Magento in 5 steps.

Step 1: Navigate to all store settings and click on create a new website

Navigate to Stores>Settings>All Stores and create a new Magento website, a new store and a new store view. 

This is just the sample data. For instance, we have named our website a German website. After saving this information you will find it in the list as shown below.

Navigate to Stores>Configuration>General>Web>Base Urls, here you need to update the Base Url and Base link URL fields.

Navigate to Stores>Configuration>General>Web>Base Urls (Secure), here you will see that the Base Url and Base link URL fields will be automatically filled.

This image shows the base url section with the required domain name.

Step 3: Configure the store view and select the preferred store view

We need to update these URLs for the German website. You will see a store view option at the top of the page on the left side. Open this drop-down menu and select the German website.

Step 4: Save the configuration

Save this configuration.

Step 5: Open the .htaccess file and add the code

Now we need to open the .htaccess file from our Magento root directory. And find IfModule mod_rewrite.c section. Add below lines of code in this section.

SetEnvIf Host magentogerman.com* MAGE_RUN_CODE=german_website
SetEnvIf Host magentogerman.com* MAGE_RUN_TYPE=website

Now we will be able to access both our websites.

FAQs

Is multiple store creation possible in Magento 2?


Yes, multiple store creation is possible in Magento 2. You can have multiple websites, multiple stores under a single domain, or even multiple domains with a single Magento installation. You can label these additional stores as subdomains and manage them through the admin panel.

What is the difference between a store and a website in Magento 2?


The difference between a store and a website in Magento 2 is that a website is like a parent to the stores. A single Magento website can hold multiple stores, each with their own products and designs but have the same settings and configurations as the parent website. For example, a website can have a default currency and payment method. For every store in the website, the same currency and payment method is applicable, even if the products sold are different.

How do I switch to another website in Magento 2?


To switch to another website in Magento 2, you need to use the admin panel. In the panel, navigate to Stores>Settings>Configuration. In the Store View section, you can see a list of all your websites. Choose the required website from the drop-down menu. Select the “Web” option under the General tab to configure the settings for the selected website.

What is multistore in Magento 2?


Multi store in Magento 2 allows you to create multiple stores with a single Magento installation. Though these stores have different customers, designs, or products, they can be managed by the same admin panel. Multi store is useful in creating different versions of the same store by changing the currency and language.

Speak your Mind

Post a Comment

Got a question? Have a feedback? Please feel free to leave your ideas, opinions, and questions in the comments section of our post! ❤️

* This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Thank you for your feedback

Comments (1)

  1. I have one question. Both domains point to the root folder?

    Reply

Grow your online business like 2,554 subscribers

    * This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
    envelope

    Thank You!

    We are reviewing your submission, and will be in touch shortly.