PHPackages                             nativemind/module-multidomain - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nativemind/module-multidomain

Active

nativemind/module-multidomain
=============================

10PHP

Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/libsPHP/module-multidomain)[ Packagist](https://packagist.org/packages/nativemind/module-multidomain)[ RSS](/packages/nativemind-module-multidomain/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersionsUsed By (0)

NativeMind MultiDomain for Magento 2
====================================

[](#nativemind-multidomain-for-magento-2)

Magento 2 module for mapping multiple domains to different Store Views. Manage domain-to-store mappings via Admin Panel without modifying code.

Features
--------

[](#features)

- Admin UI for CRUD operations on domain mappings (Stores &gt; MultiDomain Mappings)
- Configuration stored in PHP file for maximum performance (no DB queries on page load)
- Magento Plugin architecture — no core file modifications
- Fallback to default Magento behavior for unconfigured domains
- ACL permissions for admin access control
- Debug mode with logging

Requirements
------------

[](#requirements)

- Magento 2.4.x
- PHP 8.1+

Installation
------------

[](#installation)

### Manual Installation

[](#manual-installation)

1. Copy module to Magento:

    ```
    cp -r app/code/NativeMind /path/to/magento/app/code/
    ```
2. Enable and install:

    ```
    bin/magento module:enable NativeMind_MultiDomain
    bin/magento setup:upgrade
    bin/magento cache:clean
    ```

### Composer Installation

[](#composer-installation)

```
composer require nativemind/module-multidomain
bin/magento setup:upgrade
bin/magento cache:clean
```

Configuration
-------------

[](#configuration)

### Step 1: Configure Base URLs in Magento (Required)

[](#step-1-configure-base-urls-in-magento-required)

**Important:** This module only handles routing domains to Store Views. You must manually configure Base URLs for each Store View in Magento settings.

Go to **Stores &gt; Configuration &gt; General &gt; Web** and for each Store View set:

- **Base URL:** `https://your-domain.com/`
- **Base Link URL:** `https://your-domain.com/`
- **Secure Base URL:** `https://your-domain.com/`
- **Secure Base Link URL:** `https://your-domain.com/`

The plugin does not modify default URL paths — it only resolves which Store View to load based on the incoming domain.

### Step 2: Add Domain Mappings

[](#step-2-add-domain-mappings)

1. Go to **Stores &gt; MultiDomain Mappings**
2. Click **Add New Domain**
3. Enter domain (e.g., `ru.example.com`) and select Store View
4. Save

Configuration is stored in `app/etc/nativemind_multidomain.php`:

```
