Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Impaloo
Hey. I’m trying to implement a permanent redirect from domain.com to www.domain.com.
This is how my .conf file looks like.
/etc/apache2/sites-available/domain.com.conf
<VirtualHost *:80 *:443>
ServerName www.domain.com
ServerAdmin william@domain.com
DocumentRoot /var/www/domain.com/public_html
ErrorLog /var/www/domain.com/logs/error.log
CustomLog /var/www/domain.com/logs/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName domain.com
Redirect permanent / http://www.domain.com
</VirtualHost>
<VirtualHost *:443>
ServerName domain.com
Redirect permanent / https://www.domain.com
</VirtualHost>
This doesn’t work. It works if I want to achieve the opposite (www.domain.com to domain.com) however - obviously after changing a few things.