At the moment, the site can be accessed only this way - something.ru , and it should be so - www.something.ru . If you try to open www.something.ru , it is written that the server was not found.

  • one
    Set up DNS server - Pavel Mayorov

3 answers 3

www is just a subdomain of your site, you can also set www1.something.ru. Now www is not set for you, so the server will not be found.

Remember that the site should preferably be located on any one address, www.something.ru or something.ru - some must be primary, some secondary. From the secondary to the main one there should be a redirection (301) so that the sites are not perceived by the search engines as different. Thus, the link popularity will no longer be distributed between the two domains, and will be considered common, which will improve the position of the site in search engines.

To connect to a third-level domain (www.something.ru), it is necessary to insert a www record in the domain settings (DNS) indicating the server IP where the site is located and add a new virtual host for the www.something.ru domain inside the server.

You can also add a CNAME (canonical name) record instead of A records, then there will be a plus in that you don’t need to keep two records with the same IP, but there’s just a link to an already existing DNS record. www CNAME www.something.ru

    You have a domain without www . So in order to be able to log in with www , you must add an entry to the domain

    www.mydomain.com | CNAME | mydomain.com

    or

    www.mydomain.com | A | XX.XX.XX.XX www.mydomain.com | A | XX.XX.XX.XX , where X is the IP address of the server.

      As written above, you need to change the settings on the host side.

      It is desirable that the site be available only from one domain (as written by Firepro). In order to do this, you need then to prescribe 301 redirects in the .htaccess file

      Because Since the site is available on something.ru, then it is desirable to leave it:

       RewriteCond %{HTTP_HOST} ^www.site\.com$ [NC] RewriteRule ^(.*)$ http://site.com/$1 [R=301,L] 

      If essentially with www, then:

       RewriteCond %{HTTP_HOST} ^something\.ru$ [NC] RewriteRule ^(.*)$ http://www.something.ru/$1 [R=301,L]