Answer the question
In order to leave comments, you need to log in
How to link a domain without hosting and a subdomain on another hosting?
Hello! Please tell me how to link a domain that is not tied to a hosting, but is located at the same registrar as a subdomain located on another domain with its own hosting?
Example: www.domen1.ru (without hosting) and poddomen.domen2.ru (with hosting).
It is necessary that the site opens with both domen1 and subdomen, but with a redirect to domen1.
If I understand correctly, this is done by some kind of domain zone settings. Please advise which ones.
PS: Registrar and hoster - reg.ru.
Answer the question
In order to leave comments, you need to log in
The problem was solved by assigning an alias for the subdomain in the hosting control panel.
Connect a domain
to the hosting according to this instruction .
In the .htaccess file, in the image and likeness of this instruction, write
RewriteEngine On
RewriteCond %{HTTP_HOST} ^poddomen.domen2.ru$ [NC]
RewriteRule ^(.*)$ http://domen1.ru/$1 [R=301,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question