{"id":13592235,"url":"https://github.com/slorber/trailing-slash-guide","last_synced_at":"2025-05-16T04:04:46.910Z","repository":{"id":44780553,"uuid":"373793462","full_name":"slorber/trailing-slash-guide","owner":"slorber","description":"Understand and fix your static website trailing slash issues!","archived":false,"fork":false,"pushed_at":"2024-11-19T11:01:54.000Z","size":68,"stargazers_count":384,"open_issues_count":5,"forks_count":18,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-08T14:09:30.041Z","etag":null,"topics":["eleventy","gatsby","gh-pages","hugo","jamstack","jekyll","netlify","nextjs","nuxt","react","ssg","ssr","static","static-site-generator","vercel","vitepress"],"latest_commit_sha":null,"homepage":"https://sebastienlorber.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slorber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-04T09:41:41.000Z","updated_at":"2025-04-03T18:03:28.000Z","dependencies_parsed_at":"2024-11-19T11:30:41.203Z","dependency_job_id":null,"html_url":"https://github.com/slorber/trailing-slash-guide","commit_stats":{"total_commits":56,"total_committers":6,"mean_commits":9.333333333333334,"dds":0.1071428571428571,"last_synced_commit":"aa11f6da7bbf5cd8bcd45823a882e8820efde609"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slorber%2Ftrailing-slash-guide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slorber%2Ftrailing-slash-guide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slorber%2Ftrailing-slash-guide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slorber%2Ftrailing-slash-guide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slorber","download_url":"https://codeload.github.com/slorber/trailing-slash-guide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464895,"owners_count":22075570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eleventy","gatsby","gh-pages","hugo","jamstack","jekyll","netlify","nextjs","nuxt","react","ssg","ssr","static","static-site-generator","vercel","vitepress"],"created_at":"2024-08-01T16:01:07.201Z","updated_at":"2025-05-16T04:04:46.853Z","avatar_url":"https://github.com/slorber.png","language":"HTML","readme":"# Trailing Slash Guide\n\nHave trailing slash problems after deploying a static website in production?\n\nThis repo explains factually the behavior of:\n- [Static Site generators](docs/Static-Site-Generators.md) \n- [Hosting Providers](docs/Hosting-Providers.md)\n\nWe also suggest some [possible solutions](docs/Solutions.md)\n\n## Intro\n\nLet's get more familiar with trailing slash issues.\n\n**Common problems**:\n\n- SEO/perf issues: when browsing `/myPath`, your host redirects to `/myPath/`\n- 404 issues: relative link such as `\u003ca href=\"otherPath\"\u003e` are resolved differently (`/otherPath` or `/myPath/otherPath` depending on the presence/absence of a trailing slash\n- UX issues: your host adds a trailing slash, and later your single-page-application frontend router removes it, leading to a confusing experience and flickering url\n\n**Causes**:\n\n- static site generators can emit different files for the same path `/myPath`: `/myPath.html` or `/myPath/index.html` (the later can lead to an additional trailing slash)\n- host providers all have a different behavior when serving static files, there is no standard\n\n## Summary\n\nConsidering this [static site](static):\n\n```sh \nstatic\n│\n├── file.html\n│\n├── folder\n│   └── index.html\n│\n├── both.html\n└── both\n    └── index.html\n```\n\nBehavior of various static hosting providers:\n\n| Host                  | Settings                                         | Url                                                                       | /file                                                                            | /file/                                                                            | /file.html                                                                             | /folder                                                                            | /folder/                                                                            | /folder/index.html                                                                               | /both                                                                          | /both/                                                                          | /both.html                                                                             | /both/index.html                                                                             |\n| --------------------- |--------------------------------------------------| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| GitHub Pages          |                                                  | [link](https://slorber.github.io/trailing-slash-guide)                    | [✅](https://slorber.github.io/trailing-slash-guide/file)                         | [💢 404](https://slorber.github.io/trailing-slash-guide/file/)                    | [✅](https://slorber.github.io/trailing-slash-guide/file.html)                          | [➡️ /folder/](https://slorber.github.io/trailing-slash-guide/folder)               | [✅](https://slorber.github.io/trailing-slash-guide/folder/)                         | [✅](https://slorber.github.io/trailing-slash-guide/folder/index.html)                            | [✅](https://slorber.github.io/trailing-slash-guide/both)                       | [✅](https://slorber.github.io/trailing-slash-guide/both/)                       | [✅](https://slorber.github.io/trailing-slash-guide/both.html)                          | [✅](https://slorber.github.io/trailing-slash-guide/both/index.html)                          |\n| Netlify               | Default: Pretty Urls on                          | [link](https://trailing-slash-guide-pretty-url-enabled.netlify.app)       | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/file)            | [➡️ /file](https://trailing-slash-guide-pretty-url-enabled.netlify.app/file/)     | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/file.html)             | [➡️ /folder/](https://trailing-slash-guide-pretty-url-enabled.netlify.app/folder)  | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/folder/)            | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/folder/index.html)               | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/both)          | [➡️ /both](https://trailing-slash-guide-pretty-url-enabled.netlify.app/both/)   | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/both.html)             | [✅](https://trailing-slash-guide-pretty-url-enabled.netlify.app/both/index.html)             |\n| Netlify               | Pretty Urls off                                  | [link](https://trailing-slash-guide-pretty-url-disabled.netlify.app)      | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/file)           | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/file/)           | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/file.html)            | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/folder)           | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/folder/)           | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/folder/index.html)              | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/both)         | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/both/)         | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/both.html)            | [✅](https://trailing-slash-guide-pretty-url-disabled.netlify.app/both/index.html)            |\n| Vercel                | Default: cleanUrls=false trailingSlash=undefined | [link](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app) | [💢 404](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/file) | [💢 404](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/file/) | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/file.html)       | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/folder)      | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/folder/)      | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/folder/index.html)         | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/both)    | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/both/)    | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/both.html)       | [✅](https://vercel-cleanurls-false-trailingslash-undefined.vercel.app/both/index.html)       |\n| Vercel                | cleanUrls=false trailingSlash=false              | [link](https://vercel-cleanurls-false-trailingslash-false.vercel.app)     | [💢 404](https://vercel-cleanurls-false-trailingslash-false.vercel.app/file)     | [💢 404](https://vercel-cleanurls-false-trailingslash-false.vercel.app/file/)     | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/file.html)           | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/folder)          | [➡️ /folder](https://vercel-cleanurls-false-trailingslash-false.vercel.app/folder/) | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/folder/index.html)             | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/both)        | [➡️ /both](https://vercel-cleanurls-false-trailingslash-false.vercel.app/both/) | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/both.html)           | [✅](https://vercel-cleanurls-false-trailingslash-false.vercel.app/both/index.html)           |\n| Vercel                | cleanUrls=false trailingSlash=true               | [link](https://vercel-cleanurls-false-trailingslash-true.vercel.app)      | [💢 404](https://vercel-cleanurls-false-trailingslash-true.vercel.app/file)      | [💢 404](https://vercel-cleanurls-false-trailingslash-true.vercel.app/file/)      | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/file.html)            | [➡️ /folder/](https://vercel-cleanurls-false-trailingslash-true.vercel.app/folder) | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/folder/)           | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/folder/index.html)              | [➡️ /both/](https://vercel-cleanurls-false-trailingslash-true.vercel.app/both) | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/both/)         | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/both.html)            | [✅](https://vercel-cleanurls-false-trailingslash-true.vercel.app/both/index.html)            |\n| Vercel                | cleanUrls=true trailingSlash=undefined           | [link](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app)  | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/file)       | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/file/)       | [➡️ /file](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/file.html) | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/folder)       | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/folder/)       | [➡️ /folder](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/folder/index.html) | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/both)     | [✅](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/both/)     | [➡️ /both](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/both.html) | [➡️ /both](https://vercel-cleanurls-true-trailingslash-undefined.vercel.app/both/index.html) |\n| Vercel                | cleanUrls=true trailingSlash=false               | [link](https://vercel-cleanurls-true-trailingslash-false.vercel.app)      | [✅](https://vercel-cleanurls-true-trailingslash-false.vercel.app/file)           | [➡️ /file](https://vercel-cleanurls-true-trailingslash-false.vercel.app/file/)    | [➡️ /file](https://vercel-cleanurls-true-trailingslash-false.vercel.app/file.html)     | [✅](https://vercel-cleanurls-true-trailingslash-false.vercel.app/folder)           | [➡️ /folder](https://vercel-cleanurls-true-trailingslash-false.vercel.app/folder/)  | [➡️ /folder](https://vercel-cleanurls-true-trailingslash-false.vercel.app/folder/index.html)     | [✅](https://vercel-cleanurls-true-trailingslash-false.vercel.app/both)         | [➡️ /both](https://vercel-cleanurls-true-trailingslash-false.vercel.app/both/)  | [➡️ /both](https://vercel-cleanurls-true-trailingslash-false.vercel.app/both.html)     | [➡️ /both](https://vercel-cleanurls-true-trailingslash-false.vercel.app/both/index.html)     |\n| Vercel                | cleanUrls=true trailingSlash=true                | [link](https://vercel-cleanurls-true-trailingslash-true.vercel.app)       | [➡️ /file/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/file)    | [✅](https://vercel-cleanurls-true-trailingslash-true.vercel.app/file/)            | [➡️ /file/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/file.html)     | [➡️ /folder/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/folder)  | [✅](https://vercel-cleanurls-true-trailingslash-true.vercel.app/folder/)            | [➡️ /folder/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/folder/index.html)     | [➡️ /both/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/both)  | [✅](https://vercel-cleanurls-true-trailingslash-true.vercel.app/both/)          | [➡️ /both/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/both.html)     | [➡️ /both/](https://vercel-cleanurls-true-trailingslash-true.vercel.app/both/index.html)     |\n| Cloudflare Pages      |                                                  | [link](https://trailing-slash-guide.pages.dev)                            | [✅](https://trailing-slash-guide.pages.dev/file)                                 | [➡️ /file](https://trailing-slash-guide.pages.dev/file/)                          | [➡️ /file](https://trailing-slash-guide.pages.dev/file.html)                           | [➡️ /folder/](https://trailing-slash-guide.pages.dev/folder)                       | [✅](https://trailing-slash-guide.pages.dev/folder/)                                 | [➡️ /folder/](https://trailing-slash-guide.pages.dev/folder/index.html)                          | [✅](https://trailing-slash-guide.pages.dev/both)                               | [✅](https://trailing-slash-guide.pages.dev/both/)                               | [➡️ /both](https://trailing-slash-guide.pages.dev/both.html)                           | [➡️ /both/](https://trailing-slash-guide.pages.dev/both/index.html)                          |\n| Render                |                                                  | [link](https://trailing-slash-guide.onrender.com)                         | [✅](https://trailing-slash-guide.onrender.com/file)                              | [✅](https://trailing-slash-guide.onrender.com/file/)                              | [✅](https://trailing-slash-guide.onrender.com/file.html)                               | [✅](https://trailing-slash-guide.onrender.com/folder)                              | [✅](https://trailing-slash-guide.onrender.com/folder/)                              | [✅](https://trailing-slash-guide.onrender.com/folder/index.html)                                 | [✅](https://trailing-slash-guide.onrender.com/both)                            | [✅](https://trailing-slash-guide.onrender.com/both/)                            | [✅](https://trailing-slash-guide.onrender.com/both.html)                               | [✅](https://trailing-slash-guide.onrender.com/both/index.html)                               |\n| Azure Static Web Apps |                                                  | [link](https://red-dune-0d2e38c03.azurestaticapps.net)                  | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/file)                       | [➡️ /file](https://red-dune-0d2e38c03.azurestaticapps.net/file/)                  | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/file.html)                    | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/folder)                       | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/folder/)                       | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/folder/index.html)                      | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/both)                     | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/both/)                     | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/both.html)                    | [✅](https://red-dune-0d2e38c03.azurestaticapps.net/both/index.html)                    |\n\n## Help Wanted\n\nLet's keep this resource up-to-date, and make it exhaustive together.\n","funding_links":[],"categories":["HTML","Tools"],"sub_categories":["Web Services"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslorber%2Ftrailing-slash-guide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslorber%2Ftrailing-slash-guide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslorber%2Ftrailing-slash-guide/lists"}