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.

I have 2 web applications which are on different hosts. The main one (example.com) is on another hosting with domain connected to it, the second one (sub.example.com) is a wordpress website on DigitalOcean. For this, in the dns manager I created an A record which is pointing to ip of the DigitalOcean Droplet. After that, I setted the wordpress application with the desired subdomain and added SSL certificate for the subdomain in droplet.
The connection is working fine, when I’m accessing sub.example.com, it is redirecting to the wordpress website, but if users for the first time type sub.example.com, they are being redirected to https://ip_adress and gets a “ERR_CERT_COMMON_NAME_INVALID”
I tried to add a redirect from ip to subdomain in apache config, but without any result…
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^18\.182\.216\.244$1
RewriteRule ^(.*)$ https://sub.example.com/$1 [L,R=301]
</IfModule>
What can I do to solve this issue ?
c21c0b00bb284130a0d0cd3b7bdab4
IsaacMvd
Leon Junior
hashembarret@gmail.com
JetForMe
24608ead89f046a8abab394f968f2c
Philipp Mayerhofer
enews
Brian Magnosi
jairunet
Nikolas Jakson