Answer the question
In order to leave comments, you need to log in
Why does www.domain.com work and domain.com not?
Redirected my domain using A records to my VPS:
domain.com A 5.175.132.61
*.domain.com A 5.175.132.61
www.domain.com CNAME domain.com
The server has the following Apache configuration:
NameVirtualHost 5.175.132.61:80
NameVirtualHost 5.175.132.61:443
NameVirtualHost 5.175.132.61
DocumentRoot /var/www/domain.com/
ServerName www.domain.com
ServerAlias domain.com www.domain.com
When browsing to www.domain.com shows files from the /var/www directory /domain.com/, and when you go to domain.com it shows the apache test page :(
Answer the question
In order to leave comments, you need to log in
ServerAlias domain.com - remove www.domain.com. (In general, show the entire virtual host config, maybe something is not in its place). Well, or any redirect option: www.cyberforum.ru/apache/thread653394.html
I'm not sure about Apache, but on IIS this problem occurs when there is no binding for the address with www.
In other words, for a web server, the addresses www.domain.com and domain.com are completely different and you need to bind them to a specific site separately each. I'm not sure that helped, but I hope that the direction gave a successful one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question