Website "www" does not work

I have a website like test.com.

While I accept the site as "test.com" in the browser, I get the site.

But while I try to use "www.test.com". It shows that the server was not found.

It has no htaccess file, also there is nothing on the index.php page that makes this problem.

Anyone have an idea

+4
source share
3 answers

1) check your dns

2) you may need the added DNS record www IN CNAME domain.com.

3) send mail to hosting support.

Enjoy =)

+7
source

There are several potential reasons, but they come down to two main categories: dns or server configuration.
DNS can be tested using ping, dig, nslookup or any other tool, depending on which OS you are using. Basically, if you check the ip address for example.com and www.example.com, both of them should have a NAME IP address (a group of four numbers separated by periods).
IF THEY ARE ACTING, your dns is fine in this case (there are other cases when you would like them to do different things, but right now, just make sure they have the same ip address).
Then you need to specify the configuration of your web server to say that both example.com and www.example.com should use the same files and content. With Apache, this can be done using the ServerName and ServerAlias ​​directives.
Hope this helps.

+4
source

You need to edit the DNS settings and records with the domain provider.

0
source

Source: https://habr.com/ru/post/1446100/


All Articles