diff --git a/src/Model/Environment.php b/src/Model/Environment.php
index <HASH>..<HASH> 100644
--- a/src/Model/Environment.php
+++ b/src/Model/Environment.php
@@ -111,6 +111,14 @@ class Environment extends Resource implements HasActivitiesInterface
             return $urls[$app];
         }
 
+        // Look for the first URL whose key starts with "$app:".
+        \ksort($urls, SORT_NATURAL);
+        foreach ($urls as $key => $url) {
+            if (\strpos($key, $app . ':') === 0) {
+                return $url;
+            }
+        }
+
         // Fall back to the legacy SSH URL.
         return $this->constructLegacySshUrl();
     }
Support indexed SSH URLs in Environment::getSshUrl()