Question
My domain only works in certain format.
I can load my domain if it is typed domain.com, but www.domain.com does not load.
My 000-default.conf is written like so:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/html/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Not sure what give?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
Go under DNS > Choose your domain and click View > go to add record > choose CNAME > Under “Enter Name” put “www” (without quotes) and under “Enter Hostname” enter your domain like this: example.com