I have a site , for example test.com.
While i take the site as 'test.com' in the browser i getting the site.
But while i try with 'www.test.com'.Its showing server not found issue.
It doesn't have any htaccess file ,also there is nothing in the index.php page that make this issue .
Any one have any idea
If you're currently facing issues when trying to reach your website with www , while your root domain is working, make sure that there is a properly set up record for the host www on your domain's DNS zone. Just follow the steps depending on where your domain is pointing: Domain pointing to Hostinger.
With a simple set up in your domain host, you can access your site without www or your chosen subdomain. For example, you can access your site at yoursite.com as well as www.yoursite.com. To do this: You need to first follow these steps to create a CNAME record using www.
WWW is so twentieth century. Many webmasters have seen the light and are now dropping "www" from their websites. Not just small sites, but some of the largest, most popular websites have gotten rid of "www" in their URLs. Expect more notable websites to drop WWW from their URLs in the coming years.
Do You Need WWW in URLs? It's actually not necessary to use WWW in URLs. It exists for just one purpose—to identify the web address. This is not the case with other important URL signifiers, such as a File Transfer Protocol (FTP) server (ftp) or news server (news).
The reason the specific site doesn't work without the www subdomain can either be a misconfigured DNS or a misconfigured configuration. You can try to do a nslookup to find out to which IP's they are assigned (to check the DNS settings are correct):
The easiest way to fix that is to add an A record with the www. What does it mean when a website does not have www? Nothing, really. When the web was new, administrators would routinely create a special host in their domain called “www” to differentiate it from existing hosts for email, FTP, gopher, telnet login etc.
If the first is the case, then its DNS records are missconfigured. If the later is the case, then the website is just following the best practices. A website should not be accesible on both www and non-www versions. That's just bad SEO. A canonical url must be chosen and redirect the other permanently. www is an alias (CNAME) record.
This is most probably due to a DNS issue. You have to make sure the domain has an A record for www. (if no wildcard ie: * is present). Open command prompt and ping site.com, and ping www.site.com. If the IP address is the same, you can probably safely assume the issue is on your webserver.
1) check your dns
2) you may be need added record DNS www IN CNAME domain.com.
3) send mail to support hosting.
Enjoy=)
There are several potential causes, but they boil down to two main categories: dns or server configuration.
DNS can be tested with either ping, dig, nslookup, or any number of other tools, depending on what OS you are using. Basically, if you check the ip address for both example.com and www.example.com, they should both have the SAME ip address (group of four numbers separated by periods).
IF THEY DO, your dns is fine in this case (there are other cases where you would want them to do different things, but for right now, just make sure that they have the same ip address).
Next, you need to tell your web server configuration, to tell it 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.
Hopefully, this should help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With