Issue:

If your WordPress site is behind a SSL reverse proxy that’s not on the same server as the WordPress site installation, your Site Health Status might be showing 2 critical issues:

The REST API encountered an error
Your site could not complete a loopback request

This is due to WordPress site is trying to connect to itself on IP address 127.0.0.1 port 443.

Solution:

In the hosts file of the server with WordPress installation, point your website’s domain name to the internal IP address of the reverse proxy. If your reverse proxy has only one IP address, use that.

In my example, I’ll be using the internal IP address 192.168.250.100 of my reverse proxy server. Edit the /etc/hosts file and add the line replacing the IP address and the host name with your own.

192.168.250.100    eugene.yakovenko.me