Answer the question
In order to leave comments, you need to log in
Why do subdomains of all sites on a server redirect to the same site on the same server?
Three sites are hosted on a dedicated server (nginx + apache). Redirection from the www subdomain works without problems:
www.aaa.ru > aaa.ru
www.bbb.ru > bbb.ru
www.ccc.ru > ccc.ru
However, all other subdomains are redirected to aaa.ru:
bla.bbb. ru > aaa.ru
xyz.ccc.ru > aaa.ru
In the settings of the DNS records of the server, everything is identical and seems to be correct, there is a
CNAME record *.bbb.ru is an alias of bbb.ru.
What's the catch? nginx settings?
Answer the question
In order to leave comments, you need to log in
Look at the contents of .htaccess
And read how your whole economy works. DNS is not responsible for redirecting on the site.
DNS lookup - Nginx - Apache (if installed) needs to look at the entire chain.
*.bbb.ru is a synonym for all subdomains not explicitly listed in DNS.
+ see configs, webservers. There, carefully on the default server and what subdomains are generally registered on the servers.
In some cases, it is convenient to specify
server_name example.org *.example.org in the web server itself;
what does the domain itself and all its 3rd level domains mean
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question