L
L
LoginSerj2017-03-13 18:25:01
Domain Name System
LoginSerj, 2017-03-13 18:25:01

How to point multiple subdomains to one site directory?

It is necessary to direct several subdomains to one site.
Suppose there are subdomains:
ekb.site.ru
spb.site.ru
msk.site.ru
All of them should be directed to the site site.ru, BUT at the same time, so that visiting ekb.site.ru does not redirect to site.ru , and so that the user remains on the site ekb.site.ru, and the site files are loaded from site.ru I
use WordPress CMS, I tried to do it through multisites, but it didn’t work out

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Z
zorca, 2017-03-13
@zorca

Through multisites and done. What exactly didn't work?

V
Vasily Pupkin, 2017-03-14
@HectorPrima

This is called an alias and is done by the hoster in the admin panel. Usually

V
Viktor Taran, 2018-02-15
@shambler81

Apache example

<VirtualHost *:80>
 DocumentRoot /var/www/site.ru
 ServerName site.ru
ServerAlias www.site.ru dev.site.ru dev2.site.ru  и так далее.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question