Answer the question
In order to leave comments, you need to log in
Why doesn't the www version of the domain work?
Hello. We sent a subdomain to the server using an A-record, but when you try to open this domain with "www", the browser swears that the site was not found. Do I need to separately set the A-record for the www-version of the domain?
Answer the question
In order to leave comments, you need to log in
Good afternoon!
Yes, this is a separate domain for requests and must be set separately. Either the A record is the same as the main site, or the CNAME for the domain itself.
And from the point of view of SEO, these are two different sites, so it is undesirable to open both ways. It is better to redirect from one to another, for example from www to the domain itself. Otherwise, search engines will count statistics separately, and it will move more slowly
Either an A-record or a CNAME. From a DNS point of view, the name 'www' is no different from any other name, such as 'vasya'.
The web server on an incoming connection can check the Host header in the request and close the connection if the site name specified in it does not match the one specified in the web server configuration.
The site code can check the Host header in the request with the same result.
If you are sure that you directed the subdomain to the server using the A-record correctly, check the web server configuration and site code.
It is worth setting a redirect to one of the versions through .htaccess, since www is a subdomain.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question