Problem and Solution for recommending a website hosted on the same server

When trying to add a recommendation to a site on the same server, there was an error in the browser:

“Something went wrong while checking this URL, please try again”.

Trying again does not work.

The browser’s developer console had a more specific error:

“URL resolves to a non-permitted private IP block”.

Solution

After SSH’ing into the server, I found that I had entries for the other sites in /etc/hosts that set them to resolve directly to the localhost:

127.0.0.1 my.example.com

There are legitimate reasons to have such lines-- they speed up DNS lookups. But in this case, I don’t think they were necessary. Removing them resolved the issue.

Ironically, just after I posted this I tried to add another recommendation and got the same error in the browser, but there was a different message in the DevTools.

“URL contains insufficient metadata”.

A basic request shows that the site doesn’t respond in a normal way, but instead returns the entire response via JavaScript!

❯ http https://indiananativeplants.org/
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Connection: close
Content-Length: 212
Content-Type: text/html
Set-Cookie: visid_incap_1930105=Xk5PVmisSuSTQweUWQkAYfeemmUAAAAAQUIPAAAAAADmO06LhC7aObcdYpfz15ik; expires=Mon, 06 Jan 2025 06:22:46 GMT; HttpOnly; path=/; Domain=.indiananativeplants.org
Set-Cookie: incap_ses_104_1930105=jBFSGkBochtcjC/rVHxxAfeemmUAAAAAGYIYkf6V0GRoNn6VC60bZA==; path=/; Domain=.indiananativeplants.org
X-Iinfo: 11-224562269-0 0NNN RT(1704632055703 56) q(0 -1 -1 1) r(0 -1) B10(4,314,0) U18

<html>
<head>
<META NAME="robots" CONTENT="noindex,nofollow">
<script src="/_Incapsula_Resource?SWJIYLWA=5074a744e2e3d891814e9a2dace20bd4,719d34d31c8e3a6e6fffd425f7e032f3">
</script>
<body>
</body></html>

Notably, there are no Oembed / OpenGraph tags in the response. So yeah, the site is kind of broken.