M
M
Max Payne2015-04-10 13:47:44
Domain Name System
Max Payne, 2015-04-10 13:47:44

How to properly mirror a subdomain?

For example, I have a subdomain admin.site.ru . How to make a mirror of this subdomain that will be available via the link admin.ru?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Filimonov, 2015-04-17
@DmitryPhilimonov

Set up a 301 redirect from admin.ru to admin.site.ru. How to do this depends on many factors. I assume that the DNS server is not yours, in which case redirects are usually configured in the DNS / domain control panel. If redirects cannot be configured there, then create a zone for the domain there, specify the IP address of your server in the A record, add CNAME for www. If the domain already points to the server, just make a 301 redirect for it to your subdomain. In nginx, for example, this would be:

server {
     listen  80;
     server_name www.admin.ru admin.ru;
     rewrite ^ http://admin.site.ru$request_uri? permanent;
}

For apache, just use .htaccess:
If you really decide to give a separate domain for the admin panel - this is strange, it's better not to show it to anyone, keep it under SSL on a strange URL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question