A
A
amletamlet272017-01-07 15:50:40
Apache HTTP Server
amletamlet27, 2017-01-07 15:50:40

How to set up dynamic subdomains as aliases of the main domain?

There is a site with the site.ru domain.
It is necessary that for any subdomain name:
aaa.site.ru
bbb.site.ru
, etc.
, content from the site.ru main page is displayed . After reading
similar questions, I realized that I need to do three things:
1. Add DNS A record
2. Change apache config
3. Change
.htaccess there is no control panel on the server, and using the command line I don’t know how to add an A record
Please tell me what steps need to be taken to add an A record via the command line?
PS VDS Ubuntu 16.04

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sanes, 2017-01-07
@Sanes

You need to edit the domain zone. This is done on NS servers. In your case, they may not be local, but, for example, at the registrar or hosting provider.

C
CityCat4, 2017-01-07
@CityCat4

If you have administrator rights for the site.ru zone, you simply take and edit it as you need. If there is no right, no way.
You cannot add an A-record from the command line (well, apart from "echo test IN A 1.2.3.4 >> zone.txt" of course). For this, text editors or web muzzles are usually used :)

C
Cavin March, 2017-03-01
@ForbsmC

How to create dynamic subdomains?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question