Stay within your iNat Network Affiliation domain when clicking links to other iNat Network sites

The easiest way to link to other iNaturalist resources (observations, taxa, etc) is to just paste in the full URL. This causes issues with affiliate sites (of particular interest to me now that is online). The solution is to manually create relative HTML URL’s, which is a bit cumbersome.

Ideally it would be good to automatically recognize either partial links (this would not be retrospective) or to adjust full URL’s to partial/relative ones. I assume the current conversion to URL happens at time of submitting the text. Having links dynamically adjusted would obviously work differently (and create more server load) so I don’t know if its reasonable. Additionally, most people only use the one gateway and don’t really care about such issues.

Can you provide a concrete example of what you’d like to see? I think the request is to automatically recognize either partial links (this would not be retrospective) or to adjust full URL’s to partial/relative ones, but in what context? You refer to submitting the text, but it’s unclear to me what the text is, and what is being submitted.

1 Like

If someone puts in an iNaturalist link text it will automatically be reformatted to a relative link.
<a href="/observations/33359619">/observations/33359619</a>
<a href="/taxa/924041">/taxa/924041</a>

This could be done at the time of submission (as is currently done with automatically detecting hyperlinks) but could also be done retrospectively every time the text is displayed (i.e. it would need to be parsed before being displayed). The latter (retrospective) version would create more server load however and might break some rare examples where someone is specifically referring to an affiliated site. [Or a script could be run to convert all absolute links to relative ones in one go.] [This is only for iNat affiliated sites of course.]

The partial links thing was just that if you typed /observations/33359619 it would convert that to a hyperlink but that is not really necessary as its easier to copy the whole link.

Does that clarify things?


Thanks, that’s helpful. Is the text you’re referring to observation descriptions and comments?

I can understand wanting consistency and to keep users within the domain they started on, but the idea of automatically changing people’s submissions makes me nervous. The only change we make now is to add hyperlinks in cases where part of the text looks like a URL but is not already hyperlinked with HTML tags, and we simply add a hyperlink using the existing text. This is done dynamically when the web page is loaded.

To change the domain of the URL would be to make an assumption about what the user intended to link to (are they linking to the record, or to the presentation of the record in a specific domain). Personally, I’d be more comfortable with a custom scheme for such “links to records within the current domain”, sort of like how mentions are handled. But that’s just my opinion. Thanks for the clarity on the request.


I suppose one could try polling for this information, but my strong guess is that nearly 100% of such links are intended for the record itself, not the portal-specific presentation thereof.

For the few cases where the presentation is the focus, maybe that could be assumed/expected when the user provides an actual HTML hyperlink instead of just a text URL, and their HTML would be left untouched.

1 Like

If this were to be implemented, personally I would want to see it happen anywhere that text URLs are interpreted as hyperlinks. For example, if I am doing some collaborative curating with another curator in a different domain, I would want them to be able to follow my URLs to flags, taxa, taxon changes, taxon framework relationships, etc., without them getting logged out of their domain, and without my having to manually supply HTML relative hyperlinks.


we have the same issue from the portal, getting logged out when following links/urls to observations on the domain. Ideally it would pick up the domain from the users preferences?


Exactly - since it is already generating hyperlinks dynamically from things that look like URL’s I think it could quite easily be modified to find any of the affiliated sites in the URL and convert them to partial/relative hyperlinks. This obviously wouldn’t affect people who have manually added html links in the text.


Personally I use
Somebody will link something, an observation, a project, etc. to me.
I go to it and try to comment, id, join the project, etc, but I can’t. I then have to log in again because it’s a direct link, or I have to modify the link to be an iNat au link; which is a right pain.
I think Reiner’s solution would fix this and allow me to focus on my work in helping people rather than tripping over clumsy tech.

1 Like