{"article":{"slug":"stable-urls-for-42-000-huts-and-peaks","title":"Stable URLs for 42,000 Huts and Peaks","subtitle":null,"summary":"How biwak.info gives every hut, bivouac and peak a short, readable URL like /p/matterhorn that never changes: plain names when unique, then region, elevation and OpenStreetMap id as tie-breakers, with a committed slug registry so URLs never move.","content_type":"blog_post","language":"en","canonical_url":"https://peter-hoffmann.com/2026/stable-urls-for-huts-and-peaks.html","author":{"name":"Peter Hoffmann","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Peter Hoffmann","url":"https://peter-hoffmann.com/","listing_slug":null,"listing":null},"topics":[{"name":"programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"python","slug":"python","url":"https://listedarticles.com/topics/python"},{"name":"software-engineering","slug":"software-engineering","url":"https://listedarticles.com/topics/software-engineering"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":1436,"reading_minutes":6,"published_at":"2026-11-07T00:00:00.000Z","added_at":"2026-11-10T23:09:18.458Z","updated_at":"2026-11-10T23:09:18.458Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/stable-urls-for-42-000-huts-and-peaks","markdown_url":"https://listedarticles.com/articles/stable-urls-for-42-000-huts-and-peaks.md","example":false,"citation":"Peter Hoffmann, Peter Hoffmann. \"Stable URLs for 42,000 Huts and Peaks.\" 7 Nov 2026. https://peter-hoffmann.com/2026/stable-urls-for-huts-and-peaks.html (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://peter-hoffmann.com/2026/stable-urls-for-huts-and-peaks.html"},"body_markdown":"# Stable URLs for 42,000 Huts and Peaks\n\n[![Peter Hoffmann](https://peter-hoffmann.com/static/img/profil.jpg)](https://peter-hoffmann.com/about.html)\n\n[Peter Hoffmann](https://peter-hoffmann.com/about.html)\n\nNovember 7, 2026\n · [mountain](https://peter-hoffmann.com/tag/mountain.html) · [geo](https://peter-hoffmann.com/tag/geo.html) · [python](https://peter-hoffmann.com/tag/python.html)\n\nHow every hut, bivouac and peak on biwak.info gets a short, readable URL like /p/matterhorn that never changes: unique names keep the plain name, shared names get the region, then the elevation, then the OpenStreetMap id, and a committed registry makes sure a slug never moves to another place.\n\n[biwak.info](https://biwak.info) is my map of Alpine huts, bivouacs and peaks.\nFor a long time the only way to link to a hut was a `#Name` hash that did an\nexact name match and fell back to the search when the name wasn't unique. I\nwanted real URLs I can share and that show a proper preview card in a chat:\n[biwak.info/p/matterhorn](https://biwak.info/p/matterhorn).\n\nThe data comes from [OpenStreetMap](https://www.openstreetmap.org): 9,429 huts\nand bivouacs and 33,437 named peaks, 42,866 places in total. Turning a name\ninto a URL is easy. The hard part is that many places share a name, and that a\nURL, once shared, should keep pointing to the same place, even when the data\nchanges underneath.\n\n![The preview card for https://biwak.info/p/bivouac-des-periades](https://peter-hoffmann.com/static/2026/biwak-slug-card.webp)\n\n## From a name to a slug\n\nThe first step is a plain `slugify`: German umlauts are written out, everything\nelse is folded to ASCII, lowercased, and every run of other characters becomes\na single dash.\n\n```\nGERMAN_TRANSLIT = str.maketrans({\"ä\": \"ae\", \"ö\": \"oe\", \"ü\": \"ue\", \"Ä\": \"Ae\", \"Ö\": \"Oe\", \"Ü\": \"Ue\",\n                                 \"ß\": \"ss\", \"ẞ\": \"ss\"})\n\ndef slugify(text):\n    \"\"\"German transliteration for umlauts and ß, then ASCII-fold, lowercase, everything else to single dashes.\"\"\"\n    text = (text or \"\").translate(GERMAN_TRANSLIT)\n    text = unicodedata.normalize(\"NFKD\", text).encode(\"ascii\", \"ignore\").decode(\"ascii\").lower()\n    return re.sub(r\"[^a-z0-9]+\", \"-\", text).strip(\"-\")\n```\n\nSo `Oberaletschhütte` becomes `oberaletschhuette`, `Štuhecov dom` becomes\n`stuhecov-dom` and `Rifugio Città di Busto` becomes `rifugio-citta-di-busto`.\nNone of the 42,866 names ends up empty.\n\n## Names are not unique\n\nAlpine names repeat a lot. Every valley has its Jagdhütte and its Rosskopf.\nWith the name alone, the most common slugs are:\n\n| Slug | Places |\n| --- | --- |\n| `jagdhuette` | 70 |\n| `schwarzkogel` | 37 |\n| `buchberg` | 32 |\n| `rosskopf` | 32 |\n| `mitterberg` | 31 |\n\nBefore choosing a scheme, I measured how many places would still share a slug\nwith different suffixes:\n\n| Slug made of | Shared slugs | Places affected | Worst |\n| --- | --- | --- | --- |\n| name | 2,181 | 6,690 (15.6 %) | 70 |\n| name + country | 1,993 | 5,936 (13.8 %) | 64 |\n| name + region | 1,516 | 3,932 (9.2 %) | 27 |\n| name + region + elevation | 118 | 394 (0.9 %) | 21 |\n\nAdding the country barely helps: most duplicates are in the same country. The\nregion roughly halves them, but there are still 27 places called Jagdhütte in\nCarinthia alone. Elevation fixes most of the rest. It can't fix everything,\nbecause 4,311 of the huts have no elevation in OpenStreetMap. The worst case\nin the last row is `casella` in Liguria: 21 small huts with the same name and\nno elevation.\n\nSo there is no single suffix that always works, and adding all of them to every\nURL would make `/p/matterhorn` look like `/p/matterhorn-wallis-4478`.\n\n## Add a suffix only while the name is shared\n\nThe rule I settled on: a place gets the shortest slug that is unique, trying\nthese in order:\n\n1. the plain name: `/p/matterhorn`\n2. name and region: `/p/oberaletschhuette` stays plain, but a shared name\n   becomes something like `/p/rosskopf-tirol`\n3. name, region and elevation: `/p/rosskopf-tirol-2257`\n4. name, region and OpenStreetMap id: `/p/jagdhuette-kaernten-w1202594655`\n\nIn code this is a generator that yields the candidates for one place, given all\ncurrent places with the same name slug:\n\n```\ndef candidates(p, group):\n    \"\"\"Slugs for POI p in order of preference; `group` = all current POIs with the same name slug.\"\"\"\n    base, region = p[\"base\"], slugify(p[\"region\"])\n    others = [o for o in group if o[\"id\"] != p[\"id\"]]\n    if not others:\n        yield base\n    if not any(slugify(o[\"region\"]) == region for o in others):\n        yield f\"{base}-{region}\"\n    if p[\"ele\"] is not None and not any(slugify(o[\"region\"]) == region and o[\"ele\"] == p[\"ele\"] for o in others):\n        yield f\"{base}-{region}-{p['ele']}\"\n    yield f\"{base}-{region}-{p['id']}\"\n```\n\nThe OpenStreetMap id is the last resort because it's always unique, but nobody\ncan read it. On today's data the 42,866 places split like this:\n\n| Slug | Places |\n| --- | --- |\n| plain name | 36,176 |\n| + region | 2,758 |\n| + elevation | 3,474 |\n| + OpenStreetMap id | 458 |\n\n## Regions from Natural Earth\n\nThe region has to be something people recognise. I cut the\n[Natural Earth](https://www.naturalearthdata.com) admin-1 boundaries down to\nthe units that make sense in the Alps: the Bundesland in Austria and Germany,\nthe Kanton in Switzerland, the département in France (Savoie and Haute-Savoie\nare better known than the big régions), the regione in Italy with South Tyrol\nand Trentino split, and the statistical regions in Slovenia. Names use the\nGerman form where that is common (Wallis, Tessin, Aostatal), otherwise the\nlocal one. The places on the map fall into 63 of these regions.\n\nEach place gets its region by a point-in-polygon lookup with\n[Shapely](https://shapely.readthedocs.io). The boundaries are simplified, so a\nhut right on a border or a lake shore can fall outside every polygon. Then the\nnearest polygon wins:\n\n```\ndef lookup(self, lat, lon):\n    \"\"\"(cc, region name); points just outside every polygon (coast, simplified border) take the nearest.\"\"\"\n    pt = Point(lon, lat)\n    for i in self.tree.query(pt):\n        if self.geoms[i].contains(pt):\n            break\n    else:\n        i = self.tree.nearest(pt)\n    return self.props[i][\"cc\"], self.props[i][\"name\"]\n```\n\nThe region is also shown on the preview card and in the detail view, next to\nthe type: \"Biwak · Haute-Savoie, Frankreich\".\n\n## Stable: a registry that never forgets\n\nThe scheme above depends on the data. If someone adds a second Matterhorn to\nOpenStreetMap tomorrow, the plain rule would rename the real one to\n`matterhorn-wallis`, and every link shared so far would break.\n\nSo the build keeps a **slug registry**, `data/slug-registry.json`, which is\ncommitted to git. It maps every slug ever handed out to the OpenStreetMap id\nand the name:\n\n```\n\"matterhorn\": [\"n26863664\", \"Matterhorn\"],\n\"oberaletschhuette\": [\"n11262553552\", \"Oberaletschhütte\"],\n```\n\nThe assignment then follows three rules:\n\n- A slug in the registry **never moves to another place**.\n- A place **keeps its registry slug** as long as it still fits its current\n  name, even if the plain rule would now give it a different one. When a\n  second Matterhorn shows up, the old one stays `matterhorn` and only the\n  newcomer gets a suffix.\n- A **new or renamed** place gets the first candidate that isn't taken yet.\n  The old slug of a renamed place stays in the registry and redirects to the\n  new one.\n\n```\nprimary = {}\nfor p in pois:\n    fitting = [s for s in by_id.get(p[\"id\"], []) if s == p[\"base\"] or s.startswith(p[\"base\"] + \"-\")]\n    if fitting:\n        primary[p[\"id\"]] = min(fitting, key=lambda s: (len(s), s))\n\nfor base in sorted(groups):\n    for p in groups[base]:\n        if p[\"id\"] in primary:\n            continue\n        slug = next(s for s in candidates(p, groups[base]) if s not in registry)\n        registry[slug] = [p[\"id\"], p[\"name\"]]\n        primary[p[\"id\"]] = slug\n```\n\nA place that disappears from OpenStreetMap keeps its slug reserved. Opening\nit starts a search for the old name instead of showing someone else's hut.\n\nBecause the registry is a sorted JSON file with one slug per line, a build\nthat changes slugs shows up as a readable git diff. That made one mistake easy\nto spot: the first version folded `ü` to `u`, so the Oberaletschhütte was\n`/p/oberaletschhutte`. Two weeks after launch I switched to `ue`, which changed\n7,182 slugs. I rebuilt the registry from scratch, so the old slugs are gone\ninstead of redirecting.\n\n## Two fallbacks\n\nA plain name that is shared, like [/p/rosskopf](https://biwak.info/p/rosskopf),\ndoesn't return an error. It opens the search with exactly the places of that\nname, with their type, elevation and region, and each of them links to its own\nslug. The same works one level down for `/p/rosskopf-tirol`.\n\nA slug that ends in an OpenStreetMap id always resolves, even if the name part\nis wrong or outdated. `/p/old-name-n11262553552` answers with a 301 to\n`/p/oberaletschhuette`.\n\n## Limits\n\n- **Readable doesn't mean unique.** 458 places end with an OpenStreetMap id in\n  their slug. Better elevation data in OpenStreetMap would shrink that number,\n  and the registry would still keep the old slugs working as redirects.\n- **The registry only grows.** It has one line per slug ever handed out,\n  42,866 today.\n- **Changing the rules touches thousands of URLs.** Any change to `slugify` or\n  the regions renames a large part of the places, as the umlaut switch showed.\n\nThe same `/p/` URLs also let the map open peaks directly, as described in\n[Loading 33,000 Peaks on Demand with a z10 Tile Grid](https://peter-hoffmann.com/2026/loading-peaks-on-demand-with-a-z10-tile-grid.html).\n","body_html":"<h1 id=\"stable-urls-for-42-000-huts-and-peaks\">Stable URLs for 42,000 Huts and Peaks</h1>\n<p><a href=\"https://peter-hoffmann.com/about.html\" rel=\"nofollow ugc noopener\"><img src=\"https://peter-hoffmann.com/static/img/profil.jpg\" alt=\"Peter Hoffmann\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></a></p>\n<p><a href=\"https://peter-hoffmann.com/about.html\" rel=\"nofollow ugc noopener\">Peter Hoffmann</a></p>\n<p>November 7, 2026\n · <a href=\"https://peter-hoffmann.com/tag/mountain.html\" rel=\"nofollow ugc noopener\">mountain</a> · <a href=\"https://peter-hoffmann.com/tag/geo.html\" rel=\"nofollow ugc noopener\">geo</a> · <a href=\"https://peter-hoffmann.com/tag/python.html\" rel=\"nofollow ugc noopener\">python</a></p>\n<p>How every hut, bivouac and peak on biwak.info gets a short, readable URL like /p/matterhorn that never changes: unique names keep the plain name, shared names get the region, then the elevation, then the OpenStreetMap id, and a committed registry makes sure a slug never moves to another place.</p>\n<p><a href=\"https://biwak.info\" rel=\"nofollow ugc noopener\">biwak.info</a> is my map of Alpine huts, bivouacs and peaks.\nFor a long time the only way to link to a hut was a <code>#Name</code> hash that did an\nexact name match and fell back to the search when the name wasn&#39;t unique. I\nwanted real URLs I can share and that show a proper preview card in a chat:\n<a href=\"https://biwak.info/p/matterhorn\" rel=\"nofollow ugc noopener\">biwak.info/p/matterhorn</a>.</p>\n<p>The data comes from <a href=\"https://www.openstreetmap.org\" rel=\"nofollow ugc noopener\">OpenStreetMap</a>: 9,429 huts\nand bivouacs and 33,437 named peaks, 42,866 places in total. Turning a name\ninto a URL is easy. The hard part is that many places share a name, and that a\nURL, once shared, should keep pointing to the same place, even when the data\nchanges underneath.</p>\n<figure><img src=\"https://peter-hoffmann.com/static/2026/biwak-slug-card.webp\" alt=\"The preview card for https://biwak.info/p/bivouac-des-periades\" loading=\"lazy\" decoding=\"async\" referrerpolicy=\"no-referrer\" /></figure>\n<h2 id=\"from-a-name-to-a-slug\">From a name to a slug</h2>\n<p>The first step is a plain <code>slugify</code>: German umlauts are written out, everything\nelse is folded to ASCII, lowercased, and every run of other characters becomes\na single dash.</p>\n<pre><code>GERMAN_TRANSLIT = str.maketrans({&quot;ä&quot;: &quot;ae&quot;, &quot;ö&quot;: &quot;oe&quot;, &quot;ü&quot;: &quot;ue&quot;, &quot;Ä&quot;: &quot;Ae&quot;, &quot;Ö&quot;: &quot;Oe&quot;, &quot;Ü&quot;: &quot;Ue&quot;,\n                                 &quot;ß&quot;: &quot;ss&quot;, &quot;ẞ&quot;: &quot;ss&quot;})\n\ndef slugify(text):\n    &quot;&quot;&quot;German transliteration for umlauts and ß, then ASCII-fold, lowercase, everything else to single dashes.&quot;&quot;&quot;\n    text = (text or &quot;&quot;).translate(GERMAN_TRANSLIT)\n    text = unicodedata.normalize(&quot;NFKD&quot;, text).encode(&quot;ascii&quot;, &quot;ignore&quot;).decode(&quot;ascii&quot;).lower()\n    return re.sub(r&quot;[^a-z0-9]+&quot;, &quot;-&quot;, text).strip(&quot;-&quot;)</code></pre>\n<p>So <code>Oberaletschhütte</code> becomes <code>oberaletschhuette</code>, <code>Štuhecov dom</code> becomes\n<code>stuhecov-dom</code> and <code>Rifugio Città di Busto</code> becomes <code>rifugio-citta-di-busto</code>.\nNone of the 42,866 names ends up empty.</p>\n<h2 id=\"names-are-not-unique\">Names are not unique</h2>\n<p>Alpine names repeat a lot. Every valley has its Jagdhütte and its Rosskopf.\nWith the name alone, the most common slugs are:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Slug</th><th>Places</th></tr></thead><tbody><tr><td><code>jagdhuette</code></td><td>70</td></tr><tr><td><code>schwarzkogel</code></td><td>37</td></tr><tr><td><code>buchberg</code></td><td>32</td></tr><tr><td><code>rosskopf</code></td><td>32</td></tr><tr><td><code>mitterberg</code></td><td>31</td></tr></tbody></table></div>\n<p>Before choosing a scheme, I measured how many places would still share a slug\nwith different suffixes:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Slug made of</th><th>Shared slugs</th><th>Places affected</th><th>Worst</th></tr></thead><tbody><tr><td>name</td><td>2,181</td><td>6,690 (15.6 %)</td><td>70</td></tr><tr><td>name + country</td><td>1,993</td><td>5,936 (13.8 %)</td><td>64</td></tr><tr><td>name + region</td><td>1,516</td><td>3,932 (9.2 %)</td><td>27</td></tr><tr><td>name + region + elevation</td><td>118</td><td>394 (0.9 %)</td><td>21</td></tr></tbody></table></div>\n<p>Adding the country barely helps: most duplicates are in the same country. The\nregion roughly halves them, but there are still 27 places called Jagdhütte in\nCarinthia alone. Elevation fixes most of the rest. It can&#39;t fix everything,\nbecause 4,311 of the huts have no elevation in OpenStreetMap. The worst case\nin the last row is <code>casella</code> in Liguria: 21 small huts with the same name and\nno elevation.</p>\n<p>So there is no single suffix that always works, and adding all of them to every\nURL would make <code>/p/matterhorn</code> look like <code>/p/matterhorn-wallis-4478</code>.</p>\n<h2 id=\"add-a-suffix-only-while-the-name-is-shared\">Add a suffix only while the name is shared</h2>\n<p>The rule I settled on: a place gets the shortest slug that is unique, trying\nthese in order:</p>\n<ol><li>the plain name: <code>/p/matterhorn</code></li><li><p>name and region: <code>/p/oberaletschhuette</code> stays plain, but a shared name</p><p> becomes something like <code>/p/rosskopf-tirol</code></p></li><li>name, region and elevation: <code>/p/rosskopf-tirol-2257</code></li><li>name, region and OpenStreetMap id: <code>/p/jagdhuette-kaernten-w1202594655</code></li></ol>\n<p>In code this is a generator that yields the candidates for one place, given all\ncurrent places with the same name slug:</p>\n<pre><code>def candidates(p, group):\n    &quot;&quot;&quot;Slugs for POI p in order of preference; `group` = all current POIs with the same name slug.&quot;&quot;&quot;\n    base, region = p[&quot;base&quot;], slugify(p[&quot;region&quot;])\n    others = [o for o in group if o[&quot;id&quot;] != p[&quot;id&quot;]]\n    if not others:\n        yield base\n    if not any(slugify(o[&quot;region&quot;]) == region for o in others):\n        yield f&quot;{base}-{region}&quot;\n    if p[&quot;ele&quot;] is not None and not any(slugify(o[&quot;region&quot;]) == region and o[&quot;ele&quot;] == p[&quot;ele&quot;] for o in others):\n        yield f&quot;{base}-{region}-{p[&#39;ele&#39;]}&quot;\n    yield f&quot;{base}-{region}-{p[&#39;id&#39;]}&quot;</code></pre>\n<p>The OpenStreetMap id is the last resort because it&#39;s always unique, but nobody\ncan read it. On today&#39;s data the 42,866 places split like this:</p>\n<div class=\"table-wrap\"><table><thead><tr><th>Slug</th><th>Places</th></tr></thead><tbody><tr><td>plain name</td><td>36,176</td></tr><tr><td>+ region</td><td>2,758</td></tr><tr><td>+ elevation</td><td>3,474</td></tr><tr><td>+ OpenStreetMap id</td><td>458</td></tr></tbody></table></div>\n<h2 id=\"regions-from-natural-earth\">Regions from Natural Earth</h2>\n<p>The region has to be something people recognise. I cut the\n<a href=\"https://www.naturalearthdata.com\" rel=\"nofollow ugc noopener\">Natural Earth</a> admin-1 boundaries down to\nthe units that make sense in the Alps: the Bundesland in Austria and Germany,\nthe Kanton in Switzerland, the département in France (Savoie and Haute-Savoie\nare better known than the big régions), the regione in Italy with South Tyrol\nand Trentino split, and the statistical regions in Slovenia. Names use the\nGerman form where that is common (Wallis, Tessin, Aostatal), otherwise the\nlocal one. The places on the map fall into 63 of these regions.</p>\n<p>Each place gets its region by a point-in-polygon lookup with\n<a href=\"https://shapely.readthedocs.io\" rel=\"nofollow ugc noopener\">Shapely</a>. The boundaries are simplified, so a\nhut right on a border or a lake shore can fall outside every polygon. Then the\nnearest polygon wins:</p>\n<pre><code>def lookup(self, lat, lon):\n    &quot;&quot;&quot;(cc, region name); points just outside every polygon (coast, simplified border) take the nearest.&quot;&quot;&quot;\n    pt = Point(lon, lat)\n    for i in self.tree.query(pt):\n        if self.geoms[i].contains(pt):\n            break\n    else:\n        i = self.tree.nearest(pt)\n    return self.props[i][&quot;cc&quot;], self.props[i][&quot;name&quot;]</code></pre>\n<p>The region is also shown on the preview card and in the detail view, next to\nthe type: &quot;Biwak · Haute-Savoie, Frankreich&quot;.</p>\n<h2 id=\"stable-a-registry-that-never-forgets\">Stable: a registry that never forgets</h2>\n<p>The scheme above depends on the data. If someone adds a second Matterhorn to\nOpenStreetMap tomorrow, the plain rule would rename the real one to\n<code>matterhorn-wallis</code>, and every link shared so far would break.</p>\n<p>So the build keeps a <strong>slug registry</strong>, <code>data/slug-registry.json</code>, which is\ncommitted to git. It maps every slug ever handed out to the OpenStreetMap id\nand the name:</p>\n<pre><code>&quot;matterhorn&quot;: [&quot;n26863664&quot;, &quot;Matterhorn&quot;],\n&quot;oberaletschhuette&quot;: [&quot;n11262553552&quot;, &quot;Oberaletschhütte&quot;],</code></pre>\n<p>The assignment then follows three rules:</p>\n<ul><li>A slug in the registry <strong>never moves to another place</strong>.</li><li><p>A place <strong>keeps its registry slug</strong> as long as it still fits its current</p><p>name, even if the plain rule would now give it a different one. When a\nsecond Matterhorn shows up, the old one stays <code>matterhorn</code> and only the\nnewcomer gets a suffix.</p></li><li><p>A <strong>new or renamed</strong> place gets the first candidate that isn&#39;t taken yet.</p><p>The old slug of a renamed place stays in the registry and redirects to the\nnew one.</p></li></ul>\n<pre><code>primary = {}\nfor p in pois:\n    fitting = [s for s in by_id.get(p[&quot;id&quot;], []) if s == p[&quot;base&quot;] or s.startswith(p[&quot;base&quot;] + &quot;-&quot;)]\n    if fitting:\n        primary[p[&quot;id&quot;]] = min(fitting, key=lambda s: (len(s), s))\n\nfor base in sorted(groups):\n    for p in groups[base]:\n        if p[&quot;id&quot;] in primary:\n            continue\n        slug = next(s for s in candidates(p, groups[base]) if s not in registry)\n        registry[slug] = [p[&quot;id&quot;], p[&quot;name&quot;]]\n        primary[p[&quot;id&quot;]] = slug</code></pre>\n<p>A place that disappears from OpenStreetMap keeps its slug reserved. Opening\nit starts a search for the old name instead of showing someone else&#39;s hut.</p>\n<p>Because the registry is a sorted JSON file with one slug per line, a build\nthat changes slugs shows up as a readable git diff. That made one mistake easy\nto spot: the first version folded <code>ü</code> to <code>u</code>, so the Oberaletschhütte was\n<code>/p/oberaletschhutte</code>. Two weeks after launch I switched to <code>ue</code>, which changed\n7,182 slugs. I rebuilt the registry from scratch, so the old slugs are gone\ninstead of redirecting.</p>\n<h2 id=\"two-fallbacks\">Two fallbacks</h2>\n<p>A plain name that is shared, like <a href=\"https://biwak.info/p/rosskopf\" rel=\"nofollow ugc noopener\">/p/rosskopf</a>,\ndoesn&#39;t return an error. It opens the search with exactly the places of that\nname, with their type, elevation and region, and each of them links to its own\nslug. The same works one level down for <code>/p/rosskopf-tirol</code>.</p>\n<p>A slug that ends in an OpenStreetMap id always resolves, even if the name part\nis wrong or outdated. <code>/p/old-name-n11262553552</code> answers with a 301 to\n<code>/p/oberaletschhuette</code>.</p>\n<h2 id=\"limits\">Limits</h2>\n<ul><li><p><strong>Readable doesn&#39;t mean unique.</strong> 458 places end with an OpenStreetMap id in</p><p>their slug. Better elevation data in OpenStreetMap would shrink that number,\nand the registry would still keep the old slugs working as redirects.</p></li><li><p><strong>The registry only grows.</strong> It has one line per slug ever handed out,</p><p>42,866 today.</p></li><li><p><strong>Changing the rules touches thousands of URLs.</strong> Any change to <code>slugify</code> or</p><p>the regions renames a large part of the places, as the umlaut switch showed.</p></li></ul>\n<p>The same <code>/p/</code> URLs also let the map open peaks directly, as described in\n<a href=\"https://peter-hoffmann.com/2026/loading-peaks-on-demand-with-a-z10-tile-grid.html\" rel=\"nofollow ugc noopener\">Loading 33,000 Peaks on Demand with a z10 Tile Grid</a>.</p>","headings":[{"level":1,"text":"Stable URLs for 42,000 Huts and Peaks","id":"stable-urls-for-42-000-huts-and-peaks"},{"level":2,"text":"From a name to a slug","id":"from-a-name-to-a-slug"},{"level":2,"text":"Names are not unique","id":"names-are-not-unique"},{"level":2,"text":"Add a suffix only while the name is shared","id":"add-a-suffix-only-while-the-name-is-shared"},{"level":2,"text":"Regions from Natural Earth","id":"regions-from-natural-earth"},{"level":2,"text":"Stable: a registry that never forgets","id":"stable-a-registry-that-never-forgets"},{"level":2,"text":"Two fallbacks","id":"two-fallbacks"},{"level":2,"text":"Limits","id":"limits"}]}}