Multiregional website setup with region-specific content

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Multiregional website setup with region-specific content
Complex
~5 business days
FAQ

Our competencies:

Development stages

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1171
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1094
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    831
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    879
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    453

Setting Up a Multi-Regional Website (Different Content by Region)

Multi-regional website — one domain with different content based on user region. Moscow user sees Moscow prices, Krasnodar user sees their promotions and local contacts, Kazakhstan user sees tenge prices. Task is more complex than it seems: align region detection, content storage, routing, SEO and caching.

Architectural Options

Option 1: Subdirectoriessite.ru/msk/, site.ru/spb/, site.ru/krd/ Simplest for SEO, clear for users, easy on any framework. Google indexes each region separately.

Option 2: Subdomainsmsk.site.ru, spb.site.ru Requires wildcard certificate and *.site.ru DNS. Easier to split cache by region on CDN. Technically cleaner but Google may see subdomains as separate sites — worse domain authority.

Option 3: Auto-detection without URL change User always on site.ru, region detected by IP. Bad for SEO — Googlebot doesn't crawl different regions, always sees one. Only suitable if regional content doesn't need indexing.

Option 1 is optimal for most projects.

Data Model

CREATE TABLE regions (
    id          SERIAL PRIMARY KEY,
    slug        VARCHAR(16) UNIQUE NOT NULL, -- 'msk', 'spb', 'krd'
    name        VARCHAR(128) NOT NULL,
    is_default  BOOLEAN DEFAULT false,
    currency    VARCHAR(3) DEFAULT 'RUB',
    phone       VARCHAR(32),
    address     TEXT
);

-- Regional content overrides
CREATE TABLE content_region_overrides (
    content_id  INTEGER NOT NULL,
    region_id   INTEGER NOT NULL REFERENCES regions(id),
    field       VARCHAR(64) NOT NULL, -- 'price', 'title', 'body'
    value       TEXT,
    PRIMARY KEY (content_id, region_id, field)
);

Base content stored in main table. Regional overrides — only what differs. Saves space and simplifies sync: changing base content automatically updates regions without overrides.

Routing (Laravel)

// routes/web.php
Route::prefix('{region}')
    ->where(['region' => '[a-z]{2,8}'])
    ->middleware('region.resolve')
    ->group(function () {
        Route::get('/', [HomeController::class, 'index']);
        Route::get('/catalog/{slug}', [CatalogController::class, 'show']);
        Route::get('/contacts', [ContactsController::class, 'index']);
    });

// Root without region — redirect to detected region
Route::get('/', RegionDetectController::class);
// app/Http/Middleware/ResolveRegion.php
public function handle(Request $request, Closure $next): Response
{
    $slug = $request->route('region');
    $region = Region::where('slug', $slug)->firstOrFail();

    // Available throughout app via singleton
    app()->instance('current.region', $region);
    View::share('currentRegion', $region);

    return $next($request);
}

Region Detection on First Visit

// app/Http/Controllers/RegionDetectController.php
public function __invoke(Request $request): RedirectResponse
{
    // 1. Saved region in cookie
    if ($saved = $request->cookie('preferred_region')) {
        if (Region::where('slug', $saved)->exists()) {
            return redirect("/{$saved}/");
        }
    }

    // 2. GeoIP detection via MaxMind GeoIP2
    $reader = new \GeoIp2\Database\Reader(storage_path('geoip/GeoLite2-City.mmdb'));
    try {
        $record = $reader->city($request->ip());
        $citySlug = $this->mapCityToRegion($record->city->name);
    } catch (\Exception) {
        $citySlug = null;
    }

    $slug = $citySlug ?? Region::where('is_default', true)->value('slug');

    return redirect("/{$slug}/")->withCookie(
        cookie('preferred_region', $slug, 60 * 24 * 365)
    );
}

Getting Regional Content

trait HasRegionalContent
{
    public function getRegionalField(string $field, ?Region $region = null): mixed
    {
        $region ??= app('current.region');

        $override = ContentRegionOverride::where('content_id', $this->id)
            ->where('region_id', $region->id)
            ->where('field', $field)
            ->value('value');

        return $override ?? $this->$field;
    }
}

Usage: $product->getRegionalField('price') — returns regional price or base if no override.

SEO: hreflang and Sitemap

For correct regional indexing, each page must have hreflang tags:

<link rel="alternate" hreflang="ru-RU" href="https://site.ru/msk/catalog/product-1" />
<link rel="alternate" hreflang="ru-KZ" href="https://site.ru/kz/catalog/product-1" />
<link rel="alternate" hreflang="x-default" href="https://site.ru/msk/catalog/product-1" />

Regional sitemap generated separately for each region and included in sitemap_index.xml.

Caching

With Nginx or Varnish, cache key must include region:

# nginx fastcgi_cache
fastcgi_cache_key "$scheme$request_method$host$request_uri";
# URI already contains /msk/ — cache automatically split by region

For Redis cache in Laravel:

$cacheKey = "catalog.{$region->slug}.{$slug}";
Cache::remember($cacheKey, 3600, fn() => $this->buildPage($slug, $region));

Admin Interface

CMS must provide:

  • Region switcher in edit interface
  • Visual highlight of fields with regional override
  • Bulk apply override to product group
  • Report: which pages have regional versions, which don't

Timeline and Stages

Stage Content Timeline
1 Data model, migrations, CRUD regions 2 days
2 Routing, middleware, GeoIP 2 days
3 Regional content in templates 3 days
4 SEO: hreflang, sitemap 1 day
5 Admin interface 3 days
6 Caching, load testing 2 days

Total: 2–3 weeks depending on regions count and content volume.