P
P
photosho2020-10-30 15:33:16
Domain Name System
photosho, 2020-10-30 15:33:16

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

4 answer(s)
Y
Yakov, 2020-10-30
@photosho

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

R
Rsa97, 2020-10-30
@Rsa97

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'.

V
vreitech, 2020-10-30
@fzfx

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.

L
lomaster267, 2020-11-04
@lomaster267

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 question

Ask a Question

731 491 924 answers to any question