Can access IP manually but not via subdomain

So I have two public IPv4 address, provided by my VPS provider. My root domain (say example.com) has to be served from one IP addresses (added as an A record to @) which works flawlessly. However, I have a subdomain (say api.example.com) which has an A record that points to my second IP address.

The catch: I can view the page by manually typing in the IP, but not by the subdomain name (i.e api.example.com). Can anyone point me in the right direction?

What happens when you visit the subdomain? Any screenshot?

Also provide screenshots from F12 Developer Tools - Network tab and Console tab.

I get Cloudflare’s error 521 page

Any error logs from your server? Apache or Nginx?

Turns out it was a problem with the SSL certificate. It’s up now! Thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.